Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/vfs-notify/src/lib.rs')
-rw-r--r--crates/vfs-notify/src/lib.rs22
1 files changed, 10 insertions, 12 deletions
diff --git a/crates/vfs-notify/src/lib.rs b/crates/vfs-notify/src/lib.rs
index 7b0f67024c..2bd4eb6713 100644
--- a/crates/vfs-notify/src/lib.rs
+++ b/crates/vfs-notify/src/lib.rs
@@ -180,17 +180,19 @@ impl NotifyActor {
}
}
}
- self.send(loader::Message::Progress {
- n_total,
- n_done: LoadingProgress::Finished,
- config_version,
- dir: None,
- });
+ self.sender
+ .send(loader::Message::Progress {
+ n_total,
+ n_done: LoadingProgress::Finished,
+ config_version,
+ dir: None,
+ })
+ .unwrap();
}
Message::Invalidate(path) => {
let contents = read(path.as_path());
let files = vec![(path, contents)];
- self.send(loader::Message::Changed { files });
+ self.sender.send(loader::Message::Changed { files }).unwrap();
}
},
Event::NotifyEvent(event) => {
@@ -238,7 +240,7 @@ impl NotifyActor {
Some((path, contents))
})
.collect();
- self.send(loader::Message::Changed { files });
+ self.sender.send(loader::Message::Changed { files }).unwrap();
}
}
}
@@ -322,10 +324,6 @@ impl NotifyActor {
log_notify_error(watcher.watch(path, RecursiveMode::NonRecursive));
}
}
-
- fn send(&self, msg: loader::Message) {
- self.sender.send(msg).unwrap();
- }
}
fn read(path: &AbsPath) -> Option<Vec<u8>> {