]> git.lizzy.rs Git - rust.git/commitdiff
libstd: use tuple indexing
authorJorge Aparicio <japaricious@gmail.com>
Tue, 9 Dec 2014 17:09:31 +0000 (12:09 -0500)
committerJorge Aparicio <japaricious@gmail.com>
Sun, 14 Dec 2014 01:04:40 +0000 (20:04 -0500)
src/libstd/sys/unix/process.rs

index 7dde19a64762ab37dac09a8591d113ce2553a62b..dfbba0f335cdd1b663f1d621689dc2018ad26a25 100644 (file)
@@ -379,8 +379,8 @@ fn waitpid_helper(input: libc::c_int,
                 // wait indefinitely for a message to arrive.
                 //
                 // FIXME: sure would be nice to not have to scan the entire array
-                let min = active.iter().map(|a| *a.ref2()).enumerate().min_by(|p| {
-                    p.val1()
+                let min = active.iter().map(|a| a.2).enumerate().min_by(|p| {
+                    p.1
                 });
                 let (p, idx) = match min {
                     Some((idx, deadline)) => {
@@ -564,9 +564,9 @@ fn with_envp<K, V, T>(env: Option<&collections::HashMap<K, V>>,
 
             for pair in env.iter() {
                 let mut kv = Vec::new();
-                kv.push_all(pair.ref0().container_as_bytes());
+                kv.push_all(pair.0.container_as_bytes());
                 kv.push('=' as u8);
-                kv.push_all(pair.ref1().container_as_bytes());
+                kv.push_all(pair.1.container_as_bytes());
                 kv.push(0); // terminating null
                 tmps.push(kv);
             }