aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/application.rs
diff options
context:
space:
mode:
authornkitsaini2023-08-20 19:11:32 +0000
committerGitHub2023-08-20 19:11:32 +0000
commit22f4f313f1cbdaadafcc3dd471f5a0bb4f7034e1 (patch)
tree39f263a35821bc6b90874a1d740499b3bc376646 /helix-term/src/application.rs
parent2767459f89382f2b664c2a9f5ff287f3c48a896d (diff)
Remove unnecessary `Err` from `get_canonicalized_path` (#8009)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r--helix-term/src/application.rs13
1 files changed, 2 insertions, 11 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index a97ae503..3e938917 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -160,7 +160,7 @@ impl Application {
let path = helix_loader::runtime_file(Path::new("tutor"));
editor.open(&path, Action::VerticalSplit)?;
// Unset path to prevent accidentally saving to the original tutor file.
- doc_mut!(editor).set_path(None)?;
+ doc_mut!(editor).set_path(None);
} else if !args.files.is_empty() {
let first = &args.files[0].0; // we know it's not empty
if first.is_dir() {
@@ -554,16 +554,7 @@ impl Application {
let bytes = doc_save_event.text.len_bytes();
if doc.path() != Some(&doc_save_event.path) {
- if let Err(err) = doc.set_path(Some(&doc_save_event.path)) {
- log::error!(
- "error setting path for doc '{:?}': {}",
- doc.path(),
- err.to_string(),
- );
-
- self.editor.set_error(err.to_string());
- return;
- }
+ doc.set_path(Some(&doc_save_event.path));
let loader = self.editor.syn_loader.clone();