about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorljedrz <ljedrz@gmail.com>2018-07-23 15:32:57 +0200
committerljedrz <ljedrz@gmail.com>2018-07-23 15:32:57 +0200
commit49c8ba91c73c97404d3308133594702a2bf48fd1 (patch)
tree61c6e71dfe335da7797e92d531222031aeb7d31c /src/tools
parent210d61f05c8c2f9e58f167eb28ab9d8bbef4968b (diff)
Change single char str patterns to chars
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/tidy/src/deps.rs2
-rw-r--r--src/tools/tidy/src/features.rs2
-rw-r--r--src/tools/tidy/src/style.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs
index 942d27202ec..5105fc4ca4c 100644
--- a/src/tools/tidy/src/deps.rs
+++ b/src/tools/tidy/src/deps.rs
@@ -165,7 +165,7 @@ impl<'a> Crate<'a> {
 impl<'a> CrateVersion<'a> {
     /// Returns the struct and whether or not the dep is in-tree
     pub fn from_str(s: &'a str) -> (Self, bool) {
-        let mut parts = s.split(" ");
+        let mut parts = s.split(' ');
         let name = parts.next().unwrap();
         let version = parts.next().unwrap();
         let path = parts.next().unwrap();
diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs
index 4c0db993809..c9bc1b9d849 100644
--- a/src/tools/tidy/src/features.rs
+++ b/src/tools/tidy/src/features.rs
@@ -257,7 +257,7 @@ pub fn collect_lang_features(base_src_path: &Path, bad: &mut bool) -> Features {
                 None
             } else {
                 next_feature_is_rustc_internal = false;
-                let s = issue_str.split("(").nth(1).unwrap().split(")").nth(0).unwrap();
+                let s = issue_str.split('(').nth(1).unwrap().split(')').nth(0).unwrap();
                 Some(s.parse().unwrap())
             };
             Some((name.to_owned(),
diff --git a/src/tools/tidy/src/style.rs b/src/tools/tidy/src/style.rs
index b784a0e4c5f..f2f35f0f586 100644
--- a/src/tools/tidy/src/style.rs
+++ b/src/tools/tidy/src/style.rs
@@ -131,7 +131,7 @@ pub fn check(path: &Path, bad: &mut bool) {
         let skip_length = contents.contains("ignore-tidy-linelength");
         let skip_end_whitespace = contents.contains("ignore-tidy-end-whitespace");
         let mut trailing_new_lines = 0;
-        for (i, line) in contents.split("\n").enumerate() {
+        for (i, line) in contents.split('\n').enumerate() {
             let mut err = |msg: &str| {
                 tidy_error!(bad, "{}:{}: {}", file.display(), i + 1, msg);
             };