mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Address nit
This commit is contained in:
parent
1d1eea217d
commit
d6da18e99d
3 changed files with 7 additions and 3 deletions
|
@ -333,7 +333,7 @@ impl ProjectWorkspace {
|
|||
pub fn workspace_root_for(&self, path: &Path) -> Option<&Path> {
|
||||
match self {
|
||||
ProjectWorkspace::Cargo { cargo, .. } => {
|
||||
Some(cargo.workspace_root.as_ref()).filter(|root| path.starts_with(root))
|
||||
Some(cargo.workspace_root()).filter(|root| path.starts_with(root))
|
||||
}
|
||||
ProjectWorkspace::Json { project: JsonProject { roots, .. } } => roots
|
||||
.iter()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue