]> git.lizzy.rs Git - rust.git/commitdiff
change a cloning map to into_iter
authorljedrz <ljedrz@gmail.com>
Sun, 14 Oct 2018 12:30:27 +0000 (14:30 +0200)
committerljedrz <ljedrz@gmail.com>
Sun, 14 Oct 2018 15:20:45 +0000 (17:20 +0200)
src/librustc/ty/util.rs

index dfe42e0c6610904e579161e2cc5e6b2d27c0bcc3..5f63f11338a15c664afaaa2a7b19bfe2b43ae3ed 100644 (file)
@@ -681,7 +681,7 @@ fn fold_repr<It: Iterator<Item=Representability>>(iter: It) -> Representability
                 match (r1, r2) {
                     (Representability::SelfRecursive(v1),
                      Representability::SelfRecursive(v2)) => {
-                        Representability::SelfRecursive(v1.iter().map(|s| *s).chain(v2).collect())
+                        Representability::SelfRecursive(v1.into_iter().chain(v2).collect())
                     }
                     (r1, r2) => cmp::max(r1, r2)
                 }