aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/editor.rs
diff options
context:
space:
mode:
authorSkyler Hawthorne2022-04-26 23:18:20 +0000
committerSkyler Hawthorne2022-06-19 03:57:45 +0000
commited950fcc56c480dc5a54c7e07918dca9192db200 (patch)
tree453e6f56c72d8c29fe9b1e39361a13d19c9722b1 /helix-view/src/editor.rs
parent1533f489340fb63eee31c12122d6233cb5f6abaf (diff)
Add more context; Editor::open doesn't need to own path
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r--helix-view/src/editor.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index e8603221..8ef4413e 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -779,8 +779,8 @@ impl Editor {
}
// ??? possible use for integration tests
- pub fn open(&mut self, path: PathBuf, action: Action) -> Result<DocumentId, Error> {
- let path = helix_core::path::get_canonicalized_path(&path)?;
+ pub fn open(&mut self, path: &Path, action: Action) -> Result<DocumentId, Error> {
+ let path = helix_core::path::get_canonicalized_path(path)?;
let id = self.document_by_path(&path).map(|doc| doc.id);
let id = if let Some(id) = id {