mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Register virtual workspace Cargo.toml files in the VFS
This commit is contained in:
parent
7f1f85ac16
commit
d4dc3ca83b
15 changed files with 77 additions and 37 deletions
|
@ -167,6 +167,11 @@ impl ProjectJson {
|
|||
&self.project_root
|
||||
}
|
||||
|
||||
/// Returns the path to the project's manifest file, if it exists.
|
||||
pub fn manifest(&self) -> Option<&ManifestPath> {
|
||||
self.manifest.as_ref()
|
||||
}
|
||||
|
||||
/// Returns the path to the project's manifest or root folder, if no manifest exists.
|
||||
pub fn manifest_or_root(&self) -> &AbsPath {
|
||||
self.manifest.as_ref().map_or(&self.project_root, |manifest| manifest.as_ref())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue