mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 13:33:31 +00:00
Auto merge of #18289 - darichey:fix-relative-buildfiles, r=lnicola
Fix panic when json project has relative buildfile paths The `build_file` path may be relative to the workspace root.
This commit is contained in:
commit
b551482c41
1 changed files with 1 additions and 1 deletions
|
@ -553,7 +553,7 @@ impl ProjectWorkspace {
|
||||||
ProjectWorkspaceKind::Json(project) => project
|
ProjectWorkspaceKind::Json(project) => project
|
||||||
.crates()
|
.crates()
|
||||||
.filter_map(|(_, krate)| krate.build.as_ref().map(|build| build.build_file.clone()))
|
.filter_map(|(_, krate)| krate.build.as_ref().map(|build| build.build_file.clone()))
|
||||||
.map(AbsPathBuf::assert)
|
.map(|build_file| self.workspace_root().join(build_file))
|
||||||
.collect(),
|
.collect(),
|
||||||
_ => vec![],
|
_ => vec![],
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue