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.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/crates/project-model/src/manifest_path.rs b/crates/project-model/src/manifest_path.rs
index d86e81e7e1..6929a75895 100644
--- a/crates/project-model/src/manifest_path.rs
+++ b/crates/project-model/src/manifest_path.rs
@@ -1,5 +1,5 @@
//! See [`ManifestPath`].
-use std::{fmt, ops, path::Path};
+use std::{borrow::Borrow, fmt, ops};
use paths::{AbsPath, AbsPathBuf};
@@ -54,8 +54,14 @@ impl ops::Deref for ManifestPath {
}
}
-impl AsRef<Path> for ManifestPath {
- fn as_ref(&self) -> &Path {
+impl AsRef<AbsPath> for ManifestPath {
+ fn as_ref(&self) -> &AbsPath {
self.file.as_ref()
}
}
+
+impl Borrow<AbsPath> for ManifestPath {
+ fn borrow(&self) -> &AbsPath {
+ self.file.borrow()
+ }
+}