From 896c3ce2f17acc90f43c026618731cf82a42a9d9 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sat, 1 Sep 2018 16:45:14 -0700 Subject: [PATCH] tidy: extdeps.rs: Clean up loop iteration to use "for" Also eliminates a clippy lint. --- src/tools/tidy/src/extdeps.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tools/tidy/src/extdeps.rs b/src/tools/tidy/src/extdeps.rs index 74f3a41047a3..bb375c17682a 100644 --- a/src/tools/tidy/src/extdeps.rs +++ b/src/tools/tidy/src/extdeps.rs @@ -29,8 +29,7 @@ pub fn check(path: &Path, bad: &mut bool) { t!(t!(File::open(path)).read_to_string(&mut cargo_lock)); // process each line - let mut lines = cargo_lock.lines(); - while let Some(line) = lines.next() { + for line in cargo_lock.lines() { // consider only source entries if ! line.starts_with("source = ") {