We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd2354c commit 371fe76Copy full SHA for 371fe76
crates/load-cargo/src/lib.rs
@@ -39,12 +39,12 @@ pub enum ProcMacroServerChoice {
39
}
40
41
pub fn load_workspace_at(
42
- root: &Path,
+ root: impl AsRef<Path>,
43
cargo_config: &CargoConfig,
44
load_config: &LoadCargoConfig,
45
progress: &dyn Fn(String),
46
) -> anyhow::Result<(RootDatabase, vfs::Vfs, Option<ProcMacroClient>)> {
47
- let root = AbsPathBuf::assert_utf8(std::env::current_dir()?.join(root));
+ let root = AbsPathBuf::assert_utf8(root.as_ref().canonicalize()?);
48
let root = ProjectManifest::discover_single(&root)?;
49
let manifest_path = root.manifest_path().clone();
50
let mut workspace = ProjectWorkspace::load(root, cargo_config, progress)?;
0 commit comments