refactor(client): remove Unpin requirement on Body::Data

This commit is contained in:
Sean McArthur
2019-12-11 13:36:49 -08:00
parent 57ef271500
commit 52cc3f7367
3 changed files with 2 additions and 7 deletions

View File

@@ -385,7 +385,6 @@ impl<T, B> Future for Connection<T, B>
where
T: AsyncRead + AsyncWrite + Unpin + Send + 'static,
B: Payload + Unpin + 'static,
B::Data: Unpin,
{
type Output = crate::Result<()>;
@@ -521,7 +520,6 @@ impl Builder {
where
T: AsyncRead + AsyncWrite + Unpin + Send + 'static,
B: Payload + 'static,
B::Data: Unpin,
{
let opts = self.clone();
@@ -594,7 +592,6 @@ impl<T, B> Future for ProtoClient<T, B>
where
T: AsyncRead + AsyncWrite + Send + Unpin + 'static,
B: Payload + Unpin + 'static,
B::Data: Unpin,
{
type Output = crate::Result<proto::Dispatched>;

View File

@@ -153,7 +153,7 @@ where
C::Transport: Unpin + Send + 'static,
C::Future: Unpin + Send + 'static,
B: Payload + Unpin + Send + 'static,
B::Data: Send + Unpin,
B::Data: Send,
{
/// Send a `GET` request to the supplied `Uri`.
///
@@ -551,7 +551,7 @@ where
C::Transport: Unpin + Send + 'static,
C::Future: Unpin + Send + 'static,
B: Payload + Unpin + Send + 'static,
B::Data: Send + Unpin,
B::Data: Send,
{
type Response = Response<Body>;
type Error = crate::Error;

View File

@@ -31,7 +31,6 @@ pub(crate) async fn handshake<T, B>(
where
T: AsyncRead + AsyncWrite + Send + Unpin + 'static,
B: Payload,
B::Data: Unpin,
{
let (h2_tx, conn) = builder
.handshake::<_, SendBuf<B::Data>>(io)
@@ -93,7 +92,6 @@ where
impl<B> Future for ClientTask<B>
where
B: Payload + Unpin + 'static,
B::Data: Unpin,
{
type Output = crate::Result<Dispatched>;