feat(body): change Sender::send_data to an async fn.

The previous version is renamed to `try_send_data`.

BREAKING CHANGE: Usage of `send_data` should either be changed to
  async/await or use `try_send_data`.
This commit is contained in:
Sean McArthur
2019-08-30 14:50:37 -07:00
parent 0331219b40
commit 62a96c077b
4 changed files with 20 additions and 11 deletions

View File

@@ -101,7 +101,7 @@ mod response_body_lengths {
},
Bd::Unknown(b) => {
let (mut tx, body) = hyper::Body::channel();
tx.send_data(b.into()).expect("send_data");
tx.try_send_data(b.into()).expect("try_send_data");
reply.body_stream(body);
b
},