Skip to content

Commit 1ed4c2c

Browse files
Drop Send requirements on the future returned by the service (#40)
* Drop Send requirements on the future returned by the service * Remove Send bound from serve_connection_with_upgrades
1 parent 9a17089 commit 1ed4c2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/server/conn/auto.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl<E> Builder<E> {
6969
pub async fn serve_connection<I, S, B>(&self, io: I, service: S) -> Result<()>
7070
where
7171
S: Service<Request<Incoming>, Response = Response<B>> + Send,
72-
S::Future: Send + 'static,
72+
S::Future: 'static,
7373
S::Error: Into<Box<dyn StdError + Send + Sync>>,
7474
B: Body + Send + 'static,
7575
B::Data: Send,
@@ -93,7 +93,7 @@ impl<E> Builder<E> {
9393
pub async fn serve_connection_with_upgrades<I, S, B>(&self, io: I, service: S) -> Result<()>
9494
where
9595
S: Service<Request<Incoming>, Response = Response<B>> + Send,
96-
S::Future: Send + 'static,
96+
S::Future: 'static,
9797
S::Error: Into<Box<dyn StdError + Send + Sync>>,
9898
B: Body + Send + 'static,
9999
B::Data: Send,

0 commit comments

Comments
 (0)