Skip to content

Commit ebdc1bd

Browse files
committed
tidy: features.rs: Use splitn rather than a complex slice
1 parent 0e65aeb commit ebdc1bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/tidy/src/features.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub fn check(path: &Path, bad: &mut bool, quiet: bool) {
9494

9595
let feature_name = match line.find(gate_test_str) {
9696
Some(i) => {
97-
&line[i+gate_test_str.len()..line[i+1..].find(' ').unwrap_or(line.len())]
97+
line[i+gate_test_str.len()..].splitn(2, ' ').next().unwrap()
9898
},
9999
None => continue,
100100
};

0 commit comments

Comments
 (0)