diff options
| author | Josh Triplett <josh@joshtriplett.org> | 2018-09-01 17:43:26 -0700 |
|---|---|---|
| committer | Josh Triplett <josh@joshtriplett.org> | 2018-09-01 17:43:26 -0700 |
| commit | ebdc1bda7154703aa48157839dfb44e77d396dd9 (patch) | |
| tree | 88b5c3a5d5a19c49bd85ec4ed67e139f9b2a257f | |
| parent | 0e65aeb95d230ef5b49b42eebdc3b294bc71fd7a (diff) | |
| download | rust-ebdc1bda7154703aa48157839dfb44e77d396dd9.tar.gz rust-ebdc1bda7154703aa48157839dfb44e77d396dd9.zip | |
tidy: features.rs: Use splitn rather than a complex slice
| -rw-r--r-- | src/tools/tidy/src/features.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs index 91e6423a6b0..732eade263d 100644 --- a/src/tools/tidy/src/features.rs +++ b/src/tools/tidy/src/features.rs @@ -94,7 +94,7 @@ pub fn check(path: &Path, bad: &mut bool, quiet: bool) { let feature_name = match line.find(gate_test_str) { Some(i) => { - &line[i+gate_test_str.len()..line[i+1..].find(' ').unwrap_or(line.len())] + line[i+gate_test_str.len()..].splitn(2, ' ').next().unwrap() }, None => continue, }; |
