tidy: features.rs: Use splitn rather than a complex slice
This commit is contained in:
parent
0e65aeb95d
commit
ebdc1bda71
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue