X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=vendor%2Fitertools%2Ftests%2Fzip.rs;h=75157d34f3aae32c95c9482189a69efa3514445d;hb=2b03887add1ca379893ea11d649eab442706f514;hp=5801b4232ba99ad0587acdf9d78859b50369f5a3;hpb=f2b60f7d56372b42cd474522dab4a649f2c6f1a5;p=rustc.git diff --git a/vendor/itertools/tests/zip.rs b/vendor/itertools/tests/zip.rs index 5801b4232b..75157d34f3 100644 --- a/vendor/itertools/tests/zip.rs +++ b/vendor/itertools/tests/zip.rs @@ -29,8 +29,8 @@ fn test_zip_longest_size_hint() { fn test_double_ended_zip_longest() { let xs = [1, 2, 3, 4, 5, 6]; let ys = [1, 2, 3, 7]; - let a = xs.iter().map(|&x| x); - let b = ys.iter().map(|&x| x); + let a = xs.iter().copied(); + let b = ys.iter().copied(); let mut it = a.zip_longest(b); assert_eq!(it.next(), Some(Both(1, 1))); assert_eq!(it.next(), Some(Both(2, 2))); @@ -45,8 +45,8 @@ fn test_double_ended_zip_longest() { fn test_double_ended_zip() { let xs = [1, 2, 3, 4, 5, 6]; let ys = [1, 2, 3, 7]; - let a = xs.iter().map(|&x| x); - let b = ys.iter().map(|&x| x); + let a = xs.iter().copied(); + let b = ys.iter().copied(); let mut it = multizip((a, b)); assert_eq!(it.next_back(), Some((4, 7))); assert_eq!(it.next_back(), Some((3, 3)));