Skip to content

Commit

Permalink
feat(server): remove server::conn::http2::Builder::with_executor() (#…
Browse files Browse the repository at this point in the history
…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()`
  • Loading branch information
MrGunflame authored Dec 19, 2022
1 parent 8790fee commit ab59a6f
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions src/server/conn/http2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ use pin_project_lite::pin_project;
use tokio::io::{AsyncRead, AsyncWrite};

use crate::body::{Body, Incoming as IncomingBody};
use crate::common::exec::{ConnStreamExec};
use crate::common::exec::ConnStreamExec;
use crate::common::{task, Future, Pin, Poll, Unpin};
use crate::{common::time::Time, rt::Timer};
use crate::proto;
use crate::service::HttpService;
use crate::{common::time::Time, rt::Timer};

pin_project! {
/// A future binding an HTTP/2 connection with a Service.
Expand Down Expand Up @@ -89,9 +89,7 @@ where
//the Dispatched enum
Poll::Ready(Ok(()))
}
Err(e) => {
Poll::Ready(Err(e))
}
Err(e) => Poll::Ready(Err(e)),
}
}
}
Expand Down Expand Up @@ -260,17 +258,6 @@ impl<E> Builder<E> {
self
}

/// Set the executor used to spawn background tasks.
///
/// Default uses implicit default (like `tokio::spawn`).
pub fn with_executor<E2>(self, exec: E2) -> Builder<E2> {
Builder {
exec,
timer: self.timer,
h2_builder: self.h2_builder,
}
}

/// Set the timer used in background tasks.
pub fn timer<M>(&mut self, timer: M) -> &mut Self
where
Expand Down Expand Up @@ -300,8 +287,6 @@ impl<E> Builder<E> {
self.exec.clone(),
self.timer.clone(),
);
Connection {
conn: proto,
}
Connection { conn: proto }
}
}

0 comments on commit ab59a6f

Please sign in to comment.