feat(client): change connectors to return an impl Connection
Instead of returning a tuple `(impl AsyncRead + AsyncWrite, Connected)`, this adds a new trait, `hyper::client::connect::Connection`, which allows querying the connection type for a `Connected`. BREAKING CHANGE: Connectors no longer return a tuple of `(T, Connected)`, but a single `T: Connection`.
This commit is contained in:
@@ -1779,7 +1779,7 @@ impl tower_service::Service<Request<Body>> for TestService {
|
||||
let replies = self.reply.clone();
|
||||
|
||||
Box::pin(async move {
|
||||
while let Some(chunk) = req.body_mut().next().await {
|
||||
while let Some(chunk) = hyper::body::HttpBody::next(req.body_mut()).await {
|
||||
match chunk {
|
||||
Ok(chunk) => {
|
||||
tx.send(Msg::Chunk(chunk.to_vec())).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user