Skip to content

Commit fb317aa

Browse files
committed
tidy: cargo.rs: Clean up loop to use "for" instead of "while let"
Eliminates a clippy warning. Also drop the unnecessary `.peekable()`.
1 parent 2893a21 commit fb317aa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/tools/tidy/src/cargo.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ fn verify(tomlfile: &Path, libfile: &Path, bad: &mut bool) {
6565
Some(i) => &toml[i+1..],
6666
None => return,
6767
};
68-
let mut lines = deps.lines().peekable();
69-
while let Some(line) = lines.next() {
68+
for line in deps.lines() {
7069
if line.starts_with('[') {
7170
break
7271
}

0 commit comments

Comments
 (0)