Skip to content

Commit ab59a6f

Browse files
authoredDec 19, 2022
feat(server): remove server::conn::http2::Builder::with_executor() (#3089)
removes the Builder::with_executor method as it is already provided in Builder::new Closes #3087 BREAKING CHANGE: removes `server::conn::http2::Builder::with_executor()`
1 parent 8790fee commit ab59a6f

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed
 

‎src/server/conn/http2.rs

+4-19
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ use pin_project_lite::pin_project;
99
use tokio::io::{AsyncRead, AsyncWrite};
1010

1111
use crate::body::{Body, Incoming as IncomingBody};
12-
use crate::common::exec::{ConnStreamExec};
12+
use crate::common::exec::ConnStreamExec;
1313
use crate::common::{task, Future, Pin, Poll, Unpin};
14-
use crate::{common::time::Time, rt::Timer};
1514
use crate::proto;
1615
use crate::service::HttpService;
16+
use crate::{common::time::Time, rt::Timer};
1717

1818
pin_project! {
1919
/// A future binding an HTTP/2 connection with a Service.
@@ -89,9 +89,7 @@ where
8989
//the Dispatched enum
9090
Poll::Ready(Ok(()))
9191
}
92-
Err(e) => {
93-
Poll::Ready(Err(e))
94-
}
92+
Err(e) => Poll::Ready(Err(e)),
9593
}
9694
}
9795
}
@@ -260,17 +258,6 @@ impl<E> Builder<E> {
260258
self
261259
}
262260

263-
/// Set the executor used to spawn background tasks.
264-
///
265-
/// Default uses implicit default (like `tokio::spawn`).
266-
pub fn with_executor<E2>(self, exec: E2) -> Builder<E2> {
267-
Builder {
268-
exec,
269-
timer: self.timer,
270-
h2_builder: self.h2_builder,
271-
}
272-
}
273-
274261
/// Set the timer used in background tasks.
275262
pub fn timer<M>(&mut self, timer: M) -> &mut Self
276263
where
@@ -300,8 +287,6 @@ impl<E> Builder<E> {
300287
self.exec.clone(),
301288
self.timer.clone(),
302289
);
303-
Connection {
304-
conn: proto,
305-
}
290+
Connection { conn: proto }
306291
}
307292
}

0 commit comments

Comments
 (0)
Please sign in to comment.