Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/project-model/src/project_json.rs')
| -rw-r--r-- | crates/project-model/src/project_json.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/project-model/src/project_json.rs b/crates/project-model/src/project_json.rs index 5bee446f61..408593ea8a 100644 --- a/crates/project-model/src/project_json.rs +++ b/crates/project-model/src/project_json.rs @@ -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()) |