about summary refs log tree commit diff
path: root/src/libstd/sys/windows
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-02-02 11:01:12 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-02-02 11:01:12 -0800
commit7335c7dd63cafe70ffca76677f9e33bc6eccefaa (patch)
tree3646a5159f74b47d8bdf471eff072ea71f395d82 /src/libstd/sys/windows
parent075588a4939acb47feea79779a9bdacce702d9c5 (diff)
parent3484706c38272828efc50b2553578afc62230dbb (diff)
downloadrust-7335c7dd63cafe70ffca76677f9e33bc6eccefaa.tar.gz
rust-7335c7dd63cafe70ffca76677f9e33bc6eccefaa.zip
rollup merge of #21830: japaric/for-cleanup
Conflicts:
	src/librustc/metadata/filesearch.rs
	src/librustc_back/target/mod.rs
	src/libstd/os.rs
	src/libstd/sys/windows/os.rs
	src/libsyntax/ext/tt/macro_parser.rs
	src/libsyntax/print/pprust.rs
	src/test/compile-fail/issue-2149.rs
Diffstat (limited to 'src/libstd/sys/windows')
-rw-r--r--src/libstd/sys/windows/process.rs8
-rw-r--r--src/libstd/sys/windows/thread_local.rs2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs
index 043fdb38805..3ca735f7fdf 100644
--- a/src/libstd/sys/windows/process.rs
+++ b/src/libstd/sys/windows/process.rs
@@ -142,12 +142,12 @@ 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
                 // program exists.
-                for path in os::split_paths(v.container_as_bytes()).into_iter() {
+                for path in os::split_paths(v.container_as_bytes()) {
                     let path = path.join(cfg.program().as_bytes())
                                    .with_extension(env::consts::EXE_EXTENSION);
                     if path.exists() {
@@ -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 cc731738afe..54a32e43daf 100644
--- a/src/libstd/sys/windows/thread_local.rs
+++ b/src/libstd/sys/windows/thread_local.rs
@@ -249,7 +249,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());