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:
@@ -1748,7 +1748,7 @@ mod conn {
|
||||
|
||||
let (mut sender, body) = Body::channel();
|
||||
let sender = thread::spawn(move || {
|
||||
sender.send_data("hello".into()).ok().unwrap();
|
||||
sender.try_send_data("hello".into()).expect("try_send_data");
|
||||
Runtime::new().unwrap().block_on(rx).unwrap();
|
||||
sender.abort();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user