mirror of
https://github.com/openharmony/third_party_rust_h2.git
synced 2026-07-01 21:34:02 -04:00
Remove unnecessary Unpin + 'static bounds on body (#649)
This commit is contained in:
+5
-5
@@ -341,7 +341,7 @@ pub(crate) struct Peer;
|
||||
|
||||
impl<B> SendRequest<B>
|
||||
where
|
||||
B: Buf + 'static,
|
||||
B: Buf,
|
||||
{
|
||||
/// Returns `Ready` when the connection can initialize a new HTTP/2
|
||||
/// stream.
|
||||
@@ -584,7 +584,7 @@ where
|
||||
|
||||
impl<B> Future for ReadySendRequest<B>
|
||||
where
|
||||
B: Buf + 'static,
|
||||
B: Buf,
|
||||
{
|
||||
type Output = Result<SendRequest<B>, crate::Error>;
|
||||
|
||||
@@ -1100,7 +1100,7 @@ impl Builder {
|
||||
) -> impl Future<Output = Result<(SendRequest<B>, Connection<T, B>), crate::Error>>
|
||||
where
|
||||
T: AsyncRead + AsyncWrite + Unpin,
|
||||
B: Buf + 'static,
|
||||
B: Buf,
|
||||
{
|
||||
Connection::handshake2(io, self.clone())
|
||||
}
|
||||
@@ -1177,7 +1177,7 @@ where
|
||||
impl<T, B> Connection<T, B>
|
||||
where
|
||||
T: AsyncRead + AsyncWrite + Unpin,
|
||||
B: Buf + 'static,
|
||||
B: Buf,
|
||||
{
|
||||
async fn handshake2(
|
||||
mut io: T,
|
||||
@@ -1306,7 +1306,7 @@ where
|
||||
impl<T, B> Future for Connection<T, B>
|
||||
where
|
||||
T: AsyncRead + AsyncWrite + Unpin,
|
||||
B: Buf + 'static,
|
||||
B: Buf,
|
||||
{
|
||||
type Output = Result<(), crate::Error>;
|
||||
|
||||
|
||||
@@ -1229,10 +1229,7 @@ impl<B> StreamRef<B> {
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub fn clone_to_opaque(&self) -> OpaqueStreamRef
|
||||
where
|
||||
B: 'static,
|
||||
{
|
||||
pub fn clone_to_opaque(&self) -> OpaqueStreamRef {
|
||||
self.opaque.clone()
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -364,7 +364,7 @@ where
|
||||
impl<T, B> Connection<T, B>
|
||||
where
|
||||
T: AsyncRead + AsyncWrite + Unpin,
|
||||
B: Buf + 'static,
|
||||
B: Buf,
|
||||
{
|
||||
fn handshake2(io: T, builder: Builder) -> Handshake<T, B> {
|
||||
let span = tracing::trace_span!("server_handshake");
|
||||
@@ -582,7 +582,7 @@ where
|
||||
impl<T, B> futures_core::Stream for Connection<T, B>
|
||||
where
|
||||
T: AsyncRead + AsyncWrite + Unpin,
|
||||
B: Buf + 'static,
|
||||
B: Buf,
|
||||
{
|
||||
type Item = Result<(Request<RecvStream>, SendResponse<B>), crate::Error>;
|
||||
|
||||
@@ -1007,7 +1007,7 @@ impl Builder {
|
||||
pub fn handshake<T, B>(&self, io: T) -> Handshake<T, B>
|
||||
where
|
||||
T: AsyncRead + AsyncWrite + Unpin,
|
||||
B: Buf + 'static,
|
||||
B: Buf,
|
||||
{
|
||||
Connection::handshake2(io, self.clone())
|
||||
}
|
||||
@@ -1262,7 +1262,7 @@ where
|
||||
impl<T, B: Buf> Future for Handshake<T, B>
|
||||
where
|
||||
T: AsyncRead + AsyncWrite + Unpin,
|
||||
B: Buf + 'static,
|
||||
B: Buf,
|
||||
{
|
||||
type Output = Result<Connection<T, B>, crate::Error>;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ pub trait SendRequestExt {
|
||||
|
||||
impl<B> SendRequestExt for SendRequest<B>
|
||||
where
|
||||
B: Buf + Unpin + 'static,
|
||||
B: Buf,
|
||||
{
|
||||
fn get(&mut self, uri: &str) -> ResponseFuture {
|
||||
let req = Request::builder()
|
||||
|
||||
@@ -90,7 +90,7 @@ pub trait ClientExt {
|
||||
impl<T, B> ClientExt for client::Connection<T, B>
|
||||
where
|
||||
T: AsyncRead + AsyncWrite + Unpin + 'static,
|
||||
B: Buf + Unpin + 'static,
|
||||
B: Buf,
|
||||
{
|
||||
fn run<'a, F: Future + Unpin + 'a>(
|
||||
&'a mut self,
|
||||
|
||||
Reference in New Issue
Block a user