File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -6,4 +6,5 @@ pub mod prelude;
6
6
#[ cfg( feature = "gateway" ) ]
7
7
pub mod ws_impl;
8
8
9
+ #[ cfg( any( feature = "tokio" , feature = "tokio_compat" ) ) ]
9
10
pub mod tokio;
Original file line number Diff line number Diff line change 1
1
use std:: future:: Future ;
2
2
3
- #[ cfg( tokio_unstable) ]
3
+ #[ cfg( all ( tokio_unstable, not ( feature = "tokio_compat" ) ) ) ]
4
4
pub fn spawn_named < F , T > ( name : & str , future : F ) -> tokio:: task:: JoinHandle < T >
5
5
where
6
6
F : Future < Output = T > + Send + ' static ,
9
9
tokio:: task:: Builder :: new ( ) . name ( & * format ! ( "serenity::{}" , name) ) . spawn ( future)
10
10
}
11
11
12
- #[ cfg( not( tokio_unstable) ) ]
12
+ #[ cfg( any ( not( tokio_unstable) , feature = "tokio_compat" ) ) ]
13
13
pub fn spawn_named < F , T > ( _name : & str , future : F ) -> tokio:: task:: JoinHandle < T >
14
14
where
15
15
F : Future < Output = T > + Send + ' static ,
You can’t perform that action at this time.
0 commit comments