Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-core/src/uri.rs')
| -rw-r--r-- | helix-core/src/uri.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/helix-core/src/uri.rs b/helix-core/src/uri.rs index cbe0fadd..a8f9f307 100644 --- a/helix-core/src/uri.rs +++ b/helix-core/src/uri.rs @@ -37,6 +37,12 @@ impl From<PathBuf> for Uri { } } +impl From<&Path> for Uri { + fn from(path: &Path) -> Self { + Self::File(path.into()) + } +} + impl fmt::Display for Uri { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { |