Skip to content

Commit a946882

Browse files
committed
chore: fix question_mark lint error
1 parent 309672d commit a946882

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/session/watch.rs

+3-9
Original file line numberDiff line numberDiff line change
@@ -366,15 +366,9 @@ impl WatchManager {
366366
}
367367

368368
fn try_remove_watcher(&mut self, watcher_id: WatcherId, depot: &Depot) -> Option<(&str, WatchMode)> {
369-
let Some(path) = self.watching_paths.remove(&watcher_id) else {
370-
return None;
371-
};
372-
let Some(watch) = self.watches.get_mut(path) else {
373-
return None;
374-
};
375-
let Some(watcher) = watch.remove_watcher(watcher_id) else {
376-
return None;
377-
};
369+
let path = self.watching_paths.remove(&watcher_id)?;
370+
let watch = self.watches.get_mut(path)?;
371+
let watcher = watch.remove_watcher(watcher_id)?;
378372
let mut mode = watcher.kind.into_remove_mode();
379373
if watch.is_empty() {
380374
self.remove_watches(path);

0 commit comments

Comments
 (0)