1
Fork 0

tidy: cargo.rs: Clean up loop to use "for" instead of "while let"

Eliminates a clippy warning.

Also drop the unnecessary `.peekable()`.
This commit is contained in:
Josh Triplett 2018-09-01 16:40:49 -07:00
parent 2893a2127d
commit fb317aaf9e

View file

@ -65,8 +65,7 @@ fn verify(tomlfile: &Path, libfile: &Path, bad: &mut bool) {
Some(i) => &toml[i+1..],
None => return,
};
let mut lines = deps.lines().peekable();
while let Some(line) = lines.next() {
for line in deps.lines() {
if line.starts_with('[') {
break
}