9415: minor: Avoid redundant clone r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
This commit is contained in:
bors[bot]
2021-06-28 06:29:10 +00:00
committed by GitHub
+1 -1
View File
@@ -248,7 +248,7 @@ pub fn to_roots(&self, build_data: Option<&BuildDataResult>) -> Vec<PackageRoot>
.filter(|&&tgt| cargo[tgt].kind == TargetKind::Lib)
.filter_map(|&tgt| cargo[tgt].root.parent())
.map(|tgt| tgt.normalize().to_path_buf())
.filter(|path| !path.starts_with(pkg_root.clone()));
.filter(|path| !path.starts_with(&pkg_root));
include.extend(extra_targets);
let mut exclude = vec![pkg_root.join(".git")];