about summary refs log tree commit diff
path: root/src/libstd/old_path/windows.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-02-18 14:31:55 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-02-18 14:31:55 -0800
commitc07ec507e26ed5ecde63bf7138b09592d9001fb2 (patch)
tree25b5b50cf3c9a1b73455e3cc629acd6abb3be990 /src/libstd/old_path/windows.rs
parentc5fddd81ab47ddbfd5525210fb1536472de399b8 (diff)
parentd2f54e663400b98c368710669ad9a966fa950803 (diff)
downloadrust-c07ec507e26ed5ecde63bf7138b09592d9001fb2.tar.gz
rust-c07ec507e26ed5ecde63bf7138b09592d9001fb2.zip
rollup merge of #22287: Ryman/purge_carthographers
This overlaps with #22276 (I left make check running overnight) but covers a number of additional cases and has a few rewrites where the clones are not even necessary.

This also implements `RandomAccessIterator` for `iter::Cloned`

cc @steveklabnik, you may want to glance at this before #22281 gets the bors treatment
Diffstat (limited to 'src/libstd/old_path/windows.rs')
-rw-r--r--src/libstd/old_path/windows.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/old_path/windows.rs b/src/libstd/old_path/windows.rs
index 07c5e10992b..c9d6eeda762 100644
--- a/src/libstd/old_path/windows.rs
+++ b/src/libstd/old_path/windows.rs
@@ -2226,7 +2226,7 @@ mod tests {
                     assert_eq!(comps, exp);
                     let comps = path.str_components().rev().map(|x|x.unwrap())
                                 .collect::<Vec<&str>>();
-                    let exp = exp.iter().rev().map(|&x|x).collect::<Vec<&str>>();
+                    let exp = exp.iter().rev().cloned().collect::<Vec<&str>>();
                     assert_eq!(comps, exp);
                 }
             );
@@ -2282,7 +2282,7 @@ mod tests {
                     let exp: &[&[u8]] = &$exp;
                     assert_eq!(comps, exp);
                     let comps = path.components().rev().collect::<Vec<&[u8]>>();
-                    let exp = exp.iter().rev().map(|&x|x).collect::<Vec<&[u8]>>();
+                    let exp = exp.iter().rev().cloned().collect::<Vec<&[u8]>>();
                     assert_eq!(comps, exp);
                 }
             )