mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Remove call to canonicalize in BatchDatabase::load_cargo
Instead of using canonicalize, we now join the given path to `std::env::current_dir()`, which either replaces the path, if the given path is absolute, or joins the paths. This fixes #821.
This commit is contained in:
parent
ebfa26658e
commit
f7a78b2846
1 changed files with 1 additions and 1 deletions
|
@ -95,7 +95,7 @@ impl BatchDatabase {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn load_cargo(root: impl AsRef<Path>) -> Result<(BatchDatabase, Vec<SourceRootId>)> {
|
pub fn load_cargo(root: impl AsRef<Path>) -> Result<(BatchDatabase, Vec<SourceRootId>)> {
|
||||||
let root = root.as_ref().canonicalize()?;
|
let root = std::env::current_dir()?.join(root);
|
||||||
let ws = ProjectWorkspace::discover(root.as_ref())?;
|
let ws = ProjectWorkspace::discover(root.as_ref())?;
|
||||||
let mut roots = Vec::new();
|
let mut roots = Vec::new();
|
||||||
roots.push(root.clone());
|
roots.push(root.clone());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue