let stream_for_rx = ipif.stdin .take().unwrap();
- let mut reqs = Vec::with_capacity(ic.max_requests_outstanding.sat());
+ let mut reqs: Vec<Pin<Box<
+ dyn Future<Output=Result<Bytes,AE>>
+ >>> = Vec::with_capacity(ic.max_requests_outstanding.sat());
// xxx check that ic settings are all honoured
}
let resp = resp.into_body();
// xxx: some size limit to avoid mallocing the universe
- let resp = hyper::body::aggregate(resp).await
+ let resp = hyper::body::to_bytes(resp).await
.context("HTTP error fetching response body")?;
Ok::<_,AE>(resp)
}).await? }.await;
reqs.push(fut);
}
- (got, goti, _) = future::select_all(&mut reqs) =>
+ (got, goti, _) = async { future::select_all(&mut reqs).await },
+ if ! reqs.is_empty() =>
{
reqs.swap_remove(goti);
if let Some(got) = reporter.report(got) {
pub use std::cmp::{min, max};
pub use std::fs;
pub use std::fmt::{self, Debug, Display};
+pub use std::future::Future;
pub use std::io::{self, ErrorKind, Read as _};
pub use std::iter;
pub use std::mem;
pub use std::path::{Path, PathBuf};
pub use std::panic;
pub use std::process;
+pub use std::pin::Pin;
pub use std::str::FromStr;
pub use std::sync::Arc;
pub use std::task::Poll;