diff --git a/src/client/conn/http1.rs b/src/client/conn/http1.rs index 25fd7ec99d..d88817296a 100644 --- a/src/client/conn/http1.rs +++ b/src/client/conn/http1.rs @@ -2,7 +2,6 @@ use std::error::Error as StdError; use std::fmt; -use std::sync::Arc; use bytes::Bytes; use http::{Request, Response}; @@ -12,11 +11,9 @@ use tokio::io::{AsyncRead, AsyncWrite}; use super::super::dispatch; use crate::body::{Body, Incoming as IncomingBody}; use crate::common::{ - exec::{BoxSendFuture, Exec}, task, Future, Pin, Poll, }; use crate::proto; -use crate::rt::Executor; use crate::upgrade::Upgraded; type Dispatcher = @@ -102,7 +99,6 @@ where /// After setting options, the builder is used to create a handshake future. #[derive(Clone, Debug)] pub struct Builder { - pub(super) exec: Exec, h09_responses: bool, h1_parser_config: ParserConfig, h1_writev: Option, @@ -289,7 +285,6 @@ impl Builder { #[inline] pub fn new() -> Builder { Builder { - exec: Exec::Default, h09_responses: false, h1_writev: None, h1_read_buf_exact_size: None, @@ -302,15 +297,6 @@ impl Builder { } } - /// Provide an executor to execute background HTTP1 tasks. - pub fn executor(&mut self, exec: E) -> &mut Builder - where - E: Executor + Send + Sync + 'static, - { - self.exec = Exec::Executor(Arc::new(exec)); - self - } - /// Set whether HTTP/0.9 responses should be tolerated. /// /// Default is false. diff --git a/src/ffi/client.rs b/src/ffi/client.rs index 2f8af99c4e..d5cbd06519 100644 --- a/src/ffi/client.rs +++ b/src/ffi/client.rs @@ -65,11 +65,10 @@ ffi_fn! { })); hyper_clientconn { tx: Tx::Http2(tx) } }); - } + } } conn::http1::Builder::new() - .executor(options.exec.clone()) .allow_obsolete_multiline_headers_in_responses(options.http1_allow_obsolete_multiline_headers_in_responses) .preserve_header_case(options.http1_preserve_header_case) .preserve_header_order(options.http1_preserve_header_order) diff --git a/src/server/conn/http1.rs b/src/server/conn/http1.rs index f7c35e2419..9ee2fe159f 100644 --- a/src/server/conn/http1.rs +++ b/src/server/conn/http1.rs @@ -35,7 +35,7 @@ pin_project_lite::pin_project! { /// A configuration builder for HTTP/1 server connections. #[derive(Clone, Debug)] pub struct Builder { - pub(crate) timer: Time, + timer: Time, h1_half_close: bool, h1_keep_alive: bool, h1_title_case_headers: bool, diff --git a/tests/server.rs b/tests/server.rs index 1461aa05bf..5fe08848f7 100644 --- a/tests/server.rs +++ b/tests/server.rs @@ -3029,7 +3029,6 @@ impl TestClient { sender.send_request(req).await } else { let (mut sender, conn) = hyper::client::conn::http1::Builder::new() - .executor(TokioExecutor) .handshake(stream) .await .unwrap();