Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/document.rs')
-rw-r--r--helix-view/src/document.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs
index 5a17c5b7..96519029 100644
--- a/helix-view/src/document.rs
+++ b/helix-view/src/document.rs
@@ -1822,7 +1822,7 @@ impl Document {
/// File path as a URL.
pub fn url(&self) -> Option<lsp::Url> {
- lsp::Url::from_file_path(self.path()?).ok()
+ self.path().map(lsp::Url::from_file_path)
}
pub fn uri(&self) -> Option<helix_core::Uri> {