Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/project-model/src/workspace.rs')
-rw-r--r--crates/project-model/src/workspace.rs13
1 files changed, 4 insertions, 9 deletions
diff --git a/crates/project-model/src/workspace.rs b/crates/project-model/src/workspace.rs
index 465a1ad0ec..f98d983ac0 100644
--- a/crates/project-model/src/workspace.rs
+++ b/crates/project-model/src/workspace.rs
@@ -11,9 +11,8 @@ use base_db::{
};
use cfg::{CfgAtom, CfgDiff, CfgOptions};
use intern::{sym, Symbol};
-use itertools::Itertools;
use paths::{AbsPath, AbsPathBuf};
-use rustc_hash::FxHashMap;
+use rustc_hash::{FxHashMap, FxHashSet};
use semver::Version;
use span::{Edition, FileId};
use tracing::instrument;
@@ -591,9 +590,10 @@ impl ProjectWorkspace {
exclude: krate.exclude.clone(),
}
})
+ .collect::<FxHashSet<_>>()
+ .into_iter()
.chain(mk_sysroot())
- .unique()
- .collect(),
+ .collect::<Vec<_>>(),
ProjectWorkspaceKind::Cargo { cargo, rustc, build_scripts, error: _, set_test: _ } => {
cargo
.packages()
@@ -643,11 +643,6 @@ impl ProjectWorkspace {
exclude: Vec::new(),
})
}))
- .chain(cargo.is_virtual_workspace().then(|| PackageRoot {
- is_local: true,
- include: vec![cargo.workspace_root().to_path_buf()],
- exclude: Vec::new(),
- }))
.collect()
}
ProjectWorkspaceKind::DetachedFile { file, cargo: cargo_script, .. } => {