summaryrefslogtreecommitdiffstats
path: root/src/preview
diff options
context:
space:
mode:
authorsushi-shi <47691267+sushi-shi@users.noreply.github.com>2022-02-25 03:56:32 +0300
committerGitHub <noreply@github.com>2022-02-24 19:56:32 -0500
commit5451fd9865f2a75d623992a072eb639ea20e688f (patch)
treefca079a571f8fe01dc72c9a05daf6efcea18e091 /src/preview
parent55b401cfa35ee3ce09d2deba94f0d490ad666e9b (diff)
Fix clippy warnings (#144)
Diffstat (limited to 'src/preview')
-rw-r--r--src/preview/preview_dir.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/preview/preview_dir.rs b/src/preview/preview_dir.rs
index 9c4a028..c5c4ee8 100644
--- a/src/preview/preview_dir.rs
+++ b/src/preview/preview_dir.rs
@@ -11,12 +11,11 @@ impl Background {
pub fn load_preview(context: &mut AppContext, p: path::PathBuf) -> thread::JoinHandle<()> {
let event_tx = context.events.event_tx.clone();
let options = context.config_ref().display_options_ref().clone();
- let handle = thread::spawn(move || match JoshutoDirList::from_path(p, &options) {
- Ok(dirlist) => {
+
+ thread::spawn(move || {
+ if let Ok(dirlist) = JoshutoDirList::from_path(p, &options) {
let _ = event_tx.send(AppEvent::PreviewDir(Ok(dirlist)));
}
- Err(_) => {}
- });
- handle
+ })
}
}