Skip to content

Commit 022d7ef

Browse files
authored
allow creating Connection with any buffer type (#95)
1 parent 689878d commit 022d7ef

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

h3/src/server.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::{
44
task::{Context, Poll},
55
};
66

7-
use bytes::{Buf, Bytes, BytesMut};
7+
use bytes::{Buf, BytesMut};
88
use futures_util::future;
99
use http::{response, HeaderMap, Request, Response, StatusCode};
1010
use quic::StreamId;
@@ -49,9 +49,10 @@ where
4949
}
5050
}
5151

52-
impl<C> Connection<C, Bytes>
52+
impl<C, B> Connection<C, B>
5353
where
54-
C: quic::Connection<Bytes>,
54+
C: quic::Connection<B>,
55+
B: Buf,
5556
{
5657
pub async fn new(conn: C) -> Result<Self, Error> {
5758
Ok(builder().build(conn).await?)

0 commit comments

Comments
 (0)