2
2
3
3
use std:: error:: Error as StdError ;
4
4
use std:: fmt;
5
- use std:: sync:: Arc ;
6
5
7
6
use bytes:: Bytes ;
8
7
use http:: { Request , Response } ;
@@ -12,11 +11,9 @@ use tokio::io::{AsyncRead, AsyncWrite};
12
11
use super :: super :: dispatch;
13
12
use crate :: body:: { Body , Incoming as IncomingBody } ;
14
13
use crate :: common:: {
15
- exec:: { BoxSendFuture , Exec } ,
16
14
task, Future , Pin , Poll ,
17
15
} ;
18
16
use crate :: proto;
19
- use crate :: rt:: Executor ;
20
17
use crate :: upgrade:: Upgraded ;
21
18
22
19
type Dispatcher < T , B > =
102
99
/// After setting options, the builder is used to create a handshake future.
103
100
#[ derive( Clone , Debug ) ]
104
101
pub struct Builder {
105
- pub ( super ) exec : Exec ,
106
102
h09_responses : bool ,
107
103
h1_parser_config : ParserConfig ,
108
104
h1_writev : Option < bool > ,
@@ -289,7 +285,6 @@ impl Builder {
289
285
#[ inline]
290
286
pub fn new ( ) -> Builder {
291
287
Builder {
292
- exec : Exec :: Default ,
293
288
h09_responses : false ,
294
289
h1_writev : None ,
295
290
h1_read_buf_exact_size : None ,
@@ -302,15 +297,6 @@ impl Builder {
302
297
}
303
298
}
304
299
305
- /// Provide an executor to execute background HTTP1 tasks.
306
- pub fn executor < E > ( & mut self , exec : E ) -> & mut Builder
307
- where
308
- E : Executor < BoxSendFuture > + Send + Sync + ' static ,
309
- {
310
- self . exec = Exec :: Executor ( Arc :: new ( exec) ) ;
311
- self
312
- }
313
-
314
300
/// Set whether HTTP/0.9 responses should be tolerated.
315
301
///
316
302
/// Default is false.
0 commit comments