about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMateusz Mikuła <matti@marinelayer.io>2019-09-05 13:47:59 +0200
committerMateusz Mikuła <mati865@gmail.com>2019-10-22 19:23:10 +0200
commit749146827865dfe1f62ce757795415414bb75a15 (patch)
treedd6c71eda290a789298686a119add0dce2ec3a17
parente1aa297b8be571eb3b9bf936d9de9ecb13b3eace (diff)
downloadrust-749146827865dfe1f62ce757795415414bb75a15.tar.gz
rust-749146827865dfe1f62ce757795415414bb75a15.zip
Apply clippy::while_let_on_iterator suggestions
-rw-r--r--src/libstd/sys/windows/process.rs3
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 {