@@ -13,7 +13,7 @@ use std::{
13
13
14
14
use compio_driver:: { AsyncifyPool , DispatchError , Dispatchable , ProactorBuilder } ;
15
15
use compio_runtime:: { event:: Event , JoinHandle as CompioJoinHandle , Runtime } ;
16
- use flume:: { unbounded, SendError , Sender } ;
16
+ use flume:: { unbounded, Sender } ;
17
17
use futures_channel:: oneshot;
18
18
19
19
type Spawning = Box < dyn Spawnable + Send > ;
@@ -142,7 +142,7 @@ impl Dispatcher {
142
142
///
143
143
/// If all threads have panicked, this method will return an error with the
144
144
/// sent closure.
145
- pub fn dispatch < Fn , Fut , R > ( & self , f : Fn ) -> Result < oneshot:: Receiver < R > , SendError < Fn > >
145
+ pub fn dispatch < Fn , Fut , R > ( & self , f : Fn ) -> Result < oneshot:: Receiver < R > , DispatchError < Fn > >
146
146
where
147
147
Fn : ( FnOnce ( ) -> Fut ) + Send + ' static ,
148
148
Fut : Future < Output = R > + ' static ,
@@ -156,7 +156,7 @@ impl Dispatcher {
156
156
// SAFETY: We know the dispatchable we sent has type `Concrete<Fn, R>`
157
157
let recovered =
158
158
unsafe { Box :: from_raw ( Box :: into_raw ( err. 0 ) as * mut Concrete < Fn , R > ) } ;
159
- Err ( SendError ( recovered. func ) )
159
+ Err ( DispatchError ( recovered. func ) )
160
160
}
161
161
}
162
162
}
0 commit comments