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.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/project-model/src/manifest_path.rs b/crates/project-model/src/manifest_path.rs
index 4f43be2f38..fba8cc9709 100644
--- a/crates/project-model/src/manifest_path.rs
+++ b/crates/project-model/src/manifest_path.rs
@@ -1,7 +1,7 @@
//! See [`ManifestPath`].
use std::{borrow::Borrow, fmt, ops};
-use paths::{AbsPath, AbsPathBuf};
+use paths::{AbsPath, AbsPathBuf, Utf8Path};
/// More or less [`AbsPathBuf`] with non-None parent.
///
@@ -78,6 +78,12 @@ impl AsRef<std::ffi::OsStr> for ManifestPath {
}
}
+impl AsRef<Utf8Path> for ManifestPath {
+ fn as_ref(&self) -> &Utf8Path {
+ self.file.as_ref()
+ }
+}
+
impl Borrow<AbsPath> for ManifestPath {
fn borrow(&self) -> &AbsPath {
self.file.borrow()