File tree Expand file tree Collapse file tree 4 files changed +6
-17
lines changed Expand file tree Collapse file tree 4 files changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -1285,7 +1285,7 @@ impl Builder {
1285
1285
///
1286
1286
/// # Cargo Feature
1287
1287
///
1288
- /// Requires the `runtime ` cargo feature to be enabled.
1288
+ /// Requires the `tokio ` cargo feature to be enabled.
1289
1289
#[ cfg( feature = "tokio" ) ]
1290
1290
#[ cfg( feature = "http2" ) ]
1291
1291
#[ cfg_attr( docsrs, doc( cfg( feature = "http2" ) ) ) ]
@@ -1306,7 +1306,7 @@ impl Builder {
1306
1306
///
1307
1307
/// # Cargo Feature
1308
1308
///
1309
- /// Requires the `runtime ` cargo feature to be enabled.
1309
+ /// Requires the `tokio ` cargo feature to be enabled.
1310
1310
#[ cfg( feature = "tokio" ) ]
1311
1311
#[ cfg( feature = "http2" ) ]
1312
1312
#[ cfg_attr( docsrs, doc( cfg( feature = "http2" ) ) ) ]
@@ -1326,7 +1326,7 @@ impl Builder {
1326
1326
///
1327
1327
/// # Cargo Feature
1328
1328
///
1329
- /// Requires the `runtime ` cargo feature to be enabled.
1329
+ /// Requires the `tokio ` cargo feature to be enabled.
1330
1330
#[ cfg( feature = "tokio" ) ]
1331
1331
#[ cfg( feature = "http2" ) ]
1332
1332
#[ cfg_attr( docsrs, doc( cfg( feature = "http2" ) ) ) ]
Original file line number Diff line number Diff line change @@ -11,8 +11,7 @@ pub(crate) type BoxSendFuture = Pin<Box<dyn Future<Output = ()> + Send>>;
11
11
// Either the user provides an executor for background tasks, or we use
12
12
// `tokio::spawn`.
13
13
#[ derive( Clone ) ]
14
- pub enum Exec {
15
- Default ,
14
+ pub ( crate ) enum Exec {
16
15
Executor ( Arc < dyn Executor < BoxSendFuture > + Send + Sync > ) ,
17
16
}
18
17
@@ -31,17 +30,6 @@ impl Exec {
31
30
F : Future < Output = ( ) > + Send + ' static ,
32
31
{
33
32
match * self {
34
- Exec :: Default => {
35
- #[ cfg( feature = "tcp" ) ]
36
- {
37
- tokio:: task:: spawn ( fut) ;
38
- }
39
- #[ cfg( not( feature = "tcp" ) ) ]
40
- {
41
- // If no runtime, we need an executor!
42
- panic ! ( "executor must be set" )
43
- }
44
- }
45
33
Exec :: Executor ( ref e) => {
46
34
e. execute ( Box :: pin ( fut) ) ;
47
35
}
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ macro_rules! ready {
10
10
}
11
11
12
12
pub ( crate ) use ready;
13
- pub mod exec;
13
+ pub ( crate ) mod exec;
14
14
#[ cfg( feature = "client" ) ]
15
15
mod lazy;
16
16
pub ( crate ) mod rewind;
Original file line number Diff line number Diff line change 7
7
pub mod client;
8
8
mod common;
9
9
pub mod rt;
10
+ #[ cfg( feature = "server" ) ]
10
11
pub mod server;
11
12
12
13
mod error;
You can’t perform that action at this time.
0 commit comments