Make Stream impls part of optional 'stream' cargo feature (#397)

This commit is contained in:
Sean McArthur
2019-08-20 16:01:03 -07:00
committed by Carl Lerche
parent f31ec5d0da
commit a1db5428db
8 changed files with 137 additions and 85 deletions

View File

@@ -5,7 +5,7 @@ authors = ["Carl Lerche <me@carllerche.com>"]
edition = "2018"
[dependencies]
h2 = { path = "../..", features = ["unstable"] }
h2 = { path = "../..", features = ["stream", "unstable"] }
bytes = "0.4.7"
env_logger = "0.5.9"

View File

@@ -239,7 +239,9 @@ async fn abrupt_shutdown() {
srv.abrupt_shutdown(Reason::INTERNAL_ERROR);
let srv_fut = async move {
poll_fn(move |cx| srv.poll_close(cx)).await.expect("server");
poll_fn(move |cx| srv.poll_closed(cx))
.await
.expect("server");
};
join(req_fut, srv_fut).await;