##// END OF EJS Templates
rust: address 'error: unnecessarily eager cloning of iterator items'...
Mads Kiilerich -
r53005:71044315 stable
parent child Browse files
Show More
@@ -617,7 +617,7 impl IntersectionMatcher {
617 std::mem::swap(&mut m1, &mut m2);
617 std::mem::swap(&mut m1, &mut m2);
618 }
618 }
619 m1.file_set().map(|m1_files| {
619 m1.file_set().map(|m1_files| {
620 m1_files.iter().cloned().filter(|f| m2.matches(f)).collect()
620 m1_files.iter().filter(|f| m2.matches(f)).cloned().collect()
621 })
621 })
622 } else {
622 } else {
623 // without exact input file sets, we can't do an exact
623 // without exact input file sets, we can't do an exact
@@ -710,7 +710,7 impl DifferenceMatcher {
710 };
710 };
711 if base_is_exact {
711 if base_is_exact {
712 new.files = base_files.map(|files| {
712 new.files = base_files.map(|files| {
713 files.iter().cloned().filter(|f| new.matches(f)).collect()
713 files.iter().filter(|f| new.matches(f)).cloned().collect()
714 });
714 });
715 }
715 }
716 new
716 new
General Comments 0
You need to be logged in to leave comments. Login now