66
77use super :: event:: * ;
88use super :: { Config , Error , ErrorKind , EventHandler , RecursiveMode , Result , Watcher } ;
9- use crossbeam_channel :: { bounded , unbounded , Sender } ;
9+ use crate :: { unbounded , bounded , Sender , BoundSender , Receiver } ;
1010use inotify as inotify_sys;
1111use inotify_sys:: { EventMask , Inotify , WatchDescriptor , WatchMask } ;
1212use std:: collections:: HashMap ;
@@ -32,8 +32,8 @@ struct EventLoop {
3232 running : bool ,
3333 poll : mio:: Poll ,
3434 event_loop_waker : Arc < mio:: Waker > ,
35- event_loop_tx : crossbeam_channel :: Sender < EventLoopMsg > ,
36- event_loop_rx : crossbeam_channel :: Receiver < EventLoopMsg > ,
35+ event_loop_tx : Sender < EventLoopMsg > ,
36+ event_loop_rx : Receiver < EventLoopMsg > ,
3737 inotify : Option < Inotify > ,
3838 event_handler : Box < dyn EventHandler > ,
3939 watches : HashMap < PathBuf , ( WatchDescriptor , WatchMask , bool ) > ,
@@ -44,7 +44,7 @@ struct EventLoop {
4444/// Watcher implementation based on inotify
4545#[ derive( Debug ) ]
4646pub struct INotifyWatcher {
47- channel : crossbeam_channel :: Sender < EventLoopMsg > ,
47+ channel : Sender < EventLoopMsg > ,
4848 waker : Arc < mio:: Waker > ,
4949}
5050
@@ -53,7 +53,7 @@ enum EventLoopMsg {
5353 RemoveWatch ( PathBuf , Sender < Result < ( ) > > ) ,
5454 Shutdown ,
5555 RenameTimeout ( usize ) ,
56- Configure ( Config , Sender < Result < bool > > ) ,
56+ Configure ( Config , BoundSender < Result < bool > > ) ,
5757}
5858
5959#[ inline]
@@ -101,7 +101,7 @@ fn remove_watch_by_event(
101101
102102impl EventLoop {
103103 pub fn new ( inotify : Inotify , event_handler : Box < dyn EventHandler > ) -> Result < Self > {
104- let ( event_loop_tx, event_loop_rx) = crossbeam_channel :: unbounded :: < EventLoopMsg > ( ) ;
104+ let ( event_loop_tx, event_loop_rx) = unbounded :: < EventLoopMsg > ( ) ;
105105 let poll = mio:: Poll :: new ( ) ?;
106106
107107 let event_loop_waker = Arc :: new ( mio:: Waker :: new ( poll. registry ( ) , MESSAGE ) ?) ;
@@ -204,7 +204,7 @@ impl EventLoop {
204204 }
205205 }
206206
207- fn configure_raw_mode ( & mut self , _config : Config , tx : Sender < Result < bool > > ) {
207+ fn configure_raw_mode ( & mut self , _config : Config , tx : BoundSender < Result < bool > > ) {
208208 tx. send ( Ok ( false ) )
209209 . expect ( "configuration channel disconnected" ) ;
210210 }
0 commit comments