summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Zhao <jeff.no.zhao@gmail.com>2023-07-30 13:12:48 -0400
committerJeff Zhao <jeff.no.zhao@gmail.com>2023-07-30 13:12:48 -0400
commit519df1e3c250dd05565b01fa4077335f01555c56 (patch)
treece668b14fa14039fff3442979ff22adae734db29
parent5406d28a4d7dd94b4aa5b515315b25203f7b5677 (diff)
remove unwrap
-rw-r--r--src/commands/open_file.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/commands/open_file.rs b/src/commands/open_file.rs
index 1cbb0ce..42f1ea4 100644
--- a/src/commands/open_file.rs
+++ b/src/commands/open_file.rs
@@ -76,7 +76,9 @@ fn _open_with_xdg(
let handle = open::that_in_background(path);
let result = handle.join();
backend.terminal_restore()?;
- result.unwrap()?;
+ if let Ok(result) = result {
+ result?;
+ }
}
Ok(())
}