feat(lib): update Tokio, bytes, http, h2, and http-body

This commit is contained in:
Sean McArthur
2019-12-03 14:36:20 -08:00
parent 131962c86a
commit cb3f39c2dc
51 changed files with 985 additions and 1305 deletions

View File

@@ -2,7 +2,7 @@ use futures_channel::{mpsc, oneshot};
use futures_util::future::{self, FutureExt as _, TryFutureExt as _, Either};
use futures_util::stream::StreamExt as _;
use h2::client::{Builder, SendRequest};
use tokio_io::{AsyncRead, AsyncWrite};
use tokio::io::{AsyncRead, AsyncWrite};
use crate::headers::content_length_parse_all;
use crate::body::Payload;
@@ -71,7 +71,7 @@ where
}
};
exec.execute(conn_task)?;
exec.execute(conn_task);
Ok(ClientTask {
conn_drop_ref,
@@ -155,7 +155,7 @@ where
drop(conn_drop_ref);
x
});
self.executor.execute(pipe)?;
self.executor.execute(pipe);
}
}
}
@@ -175,7 +175,7 @@ where
}
}
});
self.executor.execute(cb.send_when(fut))?;
self.executor.execute(cb.send_when(fut));
continue;
},

View File

@@ -4,7 +4,7 @@ use std::marker::Unpin;
use pin_project::{pin_project, project};
use h2::Reason;
use h2::server::{Builder, Connection, Handshake, SendResponse};
use tokio_io::{AsyncRead, AsyncWrite};
use tokio::io::{AsyncRead, AsyncWrite};
use crate::body::Payload;
use crate::common::exec::H2Exec;
@@ -175,7 +175,7 @@ where
crate::Body::h2(stream, content_length)
});
let fut = H2Stream::new(service.call(req), respond);
exec.execute_h2stream(fut)?;
exec.execute_h2stream(fut);
},
Some(Err(e)) => {
return Poll::Ready(Err(crate::Error::new_h2(e)));
@@ -285,7 +285,6 @@ where
res
.headers_mut()
.entry(::http::header::DATE)
.expect("DATE is a valid HeaderName")
.or_insert_with(crate::proto::h1::date::update_and_header_value);