Skip to content

Commit 7491468

Browse files
committed
Apply clippy::while_let_on_iterator suggestions
1 parent e1aa297 commit 7491468

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/libstd/sys/windows/process.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,9 +472,8 @@ fn make_command_line(prog: &OsStr, args: &[OsString]) -> io::Result<Vec<u16>> {
472472
cmd.push('"' as u16);
473473
}
474474

475-
let mut iter = arg.encode_wide();
476475
let mut backslashes: usize = 0;
477-
while let Some(x) = iter.next() {
476+
for x in arg.encode_wide() {
478477
if x == '\\' as u16 {
479478
backslashes += 1;
480479
} else {

0 commit comments

Comments
 (0)