Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/project-model/src/manifest_path.rs')
-rw-r--r--crates/project-model/src/manifest_path.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/project-model/src/manifest_path.rs b/crates/project-model/src/manifest_path.rs
index 6929a75895..2331c0c36c 100644
--- a/crates/project-model/src/manifest_path.rs
+++ b/crates/project-model/src/manifest_path.rs
@@ -38,6 +38,10 @@ impl ManifestPath {
pub fn canonicalize(&self) -> ! {
(**self).canonicalize()
}
+
+ pub fn is_rust_manifest(&self) -> bool {
+ self.file.extension().map_or(false, |ext| ext == "rs")
+ }
}
impl fmt::Display for ManifestPath {