From cc54d2bbc662369394ae198a27b02665aeb15077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Mon, 28 Jun 2021 09:28:31 +0300 Subject: [PATCH] Avoid redundant clone --- crates/project_model/src/workspace.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/project_model/src/workspace.rs b/crates/project_model/src/workspace.rs index 5c178785d80..e4923a59d72 100644 --- a/crates/project_model/src/workspace.rs +++ b/crates/project_model/src/workspace.rs @@ -248,7 +248,7 @@ impl ProjectWorkspace { .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")];