diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2015-01-31 12:20:46 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2015-02-02 13:40:18 -0500 |
| commit | d5d7e6565a4034b93d19be1edafd20730a4276bc (patch) | |
| tree | f978751c20a214c9fe0cd2d60645a4e1a3b760fd /src/libstd/sys/windows | |
| parent | 9f90d666e0cd9a73ef35b76b6605f9d1f69df849 (diff) | |
| download | rust-d5d7e6565a4034b93d19be1edafd20730a4276bc.tar.gz rust-d5d7e6565a4034b93d19be1edafd20730a4276bc.zip | |
`for x in xs.iter()` -> `for x in &xs`
Diffstat (limited to 'src/libstd/sys/windows')
| -rw-r--r-- | src/libstd/sys/windows/os.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/windows/process.rs | 6 | ||||
| -rw-r--r-- | src/libstd/sys/windows/thread_local.rs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/sys/windows/os.rs b/src/libstd/sys/windows/os.rs index a82259ad5ec..3ac54f2e793 100644 --- a/src/libstd/sys/windows/os.rs +++ b/src/libstd/sys/windows/os.rs @@ -240,7 +240,7 @@ pub fn split_paths(unparsed: &[u8]) -> Vec<Path> { let mut in_progress = Vec::new(); let mut in_quote = false; - for b in unparsed.iter() { + for b in unparsed { match *b { b';' if !in_quote => { parsed.push(Path::new(in_progress.as_slice())); diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs index 3d66718d00b..a0a0c08ed09 100644 --- a/src/libstd/sys/windows/process.rs +++ b/src/libstd/sys/windows/process.rs @@ -142,7 +142,7 @@ impl Process { // To have the spawning semantics of unix/windows stay the same, we need to // read the *child's* PATH if one is provided. See #15149 for more details. let program = cfg.env().and_then(|env| { - for (key, v) in env.iter() { + for (key, v) in env { if b"PATH" != key.container_as_bytes() { continue } // Split the value and test each path to see if the @@ -372,7 +372,7 @@ fn make_command_line(prog: &CString, args: &[CString]) -> String { let mut cmd = String::new(); append_arg(&mut cmd, str::from_utf8(prog.as_bytes()).ok() .expect("expected program name to be utf-8 encoded")); - for arg in args.iter() { + for arg in args { cmd.push(' '); append_arg(&mut cmd, str::from_utf8(arg.as_bytes()).ok() .expect("expected argument to be utf-8 encoded")); @@ -437,7 +437,7 @@ fn with_envp<K, V, T, F>(env: Option<&collections::HashMap<K, V>>, cb: F) -> T Some(env) => { let mut blk = Vec::new(); - for pair in env.iter() { + for pair in env { let kv = format!("{}={}", pair.0.container_as_str().unwrap(), pair.1.container_as_str().unwrap()); diff --git a/src/libstd/sys/windows/thread_local.rs b/src/libstd/sys/windows/thread_local.rs index 0f8ceed39a6..5c73233d94b 100644 --- a/src/libstd/sys/windows/thread_local.rs +++ b/src/libstd/sys/windows/thread_local.rs @@ -248,7 +248,7 @@ unsafe fn run_dtors() { DTOR_LOCK.unlock(); ret }; - for &(key, dtor) in dtors.iter() { + for &(key, dtor) in &dtors { let ptr = TlsGetValue(key); if !ptr.is_null() { TlsSetValue(key, ptr::null_mut()); |
