Use Sender instead of boxed closure in vfs

This commit is contained in:
mo8it 2024-08-09 23:40:32 +02:00
parent cb6b2ab5ba
commit 3b560a550a
6 changed files with 38 additions and 31 deletions

View file

@ -72,7 +72,7 @@ pub enum Message {
}
/// Type that will receive [`Messages`](Message) from a [`Handle`].
pub type Sender = Box<dyn Fn(Message) + Send + Sync>;
pub type Sender = crossbeam_channel::Sender<Message>;
/// Interface for reading and watching files.
pub trait Handle: fmt::Debug {