diff options
| author | Mateusz Mikuła <matti@marinelayer.io> | 2019-09-05 13:47:59 +0200 |
|---|---|---|
| committer | Mateusz Mikuła <mati865@gmail.com> | 2019-10-22 19:23:10 +0200 |
| commit | 749146827865dfe1f62ce757795415414bb75a15 (patch) | |
| tree | dd6c71eda290a789298686a119add0dce2ec3a17 | |
| parent | e1aa297b8be571eb3b9bf936d9de9ecb13b3eace (diff) | |
| download | rust-749146827865dfe1f62ce757795415414bb75a15.tar.gz rust-749146827865dfe1f62ce757795415414bb75a15.zip | |
Apply clippy::while_let_on_iterator suggestions
| -rw-r--r-- | src/libstd/sys/windows/process.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs index 61393680883..096b7bea8a5 100644 --- a/src/libstd/sys/windows/process.rs +++ b/src/libstd/sys/windows/process.rs @@ -472,9 +472,8 @@ fn make_command_line(prog: &OsStr, args: &[OsString]) -> io::Result<Vec<u16>> { cmd.push('"' as u16); } - let mut iter = arg.encode_wide(); let mut backslashes: usize = 0; - while let Some(x) = iter.next() { + for x in arg.encode_wide() { if x == '\\' as u16 { backslashes += 1; } else { |
