DROP changing hyper made futures extension traits fall out of order?

This seems to be an issue with `pin-project` resolved in the git branch
of `hyper` (but not yet released).
This commit is contained in:
Henry de Valence 2019-09-11 22:31:14 -07:00
parent ddf0765919
commit f2357deaff
1 changed files with 6 additions and 1 deletions

View File

@ -126,7 +126,12 @@ curl -X POST localhost:3000/filter -d "zebrad=trace"
)),
(&Method::POST, "/filter") => {
// Combine all HTTP request chunks into one
let whole_chunk = req.into_body().try_concat().await?;
//let whole_chunk = req.into_body().try_concat().await?;
// XXX try_concat extension trait is not applying for some reason,
// just pull one chunk
let mut body = req.into_body();
let maybe_chunk = body.next().await;
let whole_chunk = maybe_chunk.unwrap()?;
match reload_filter_from_chunk(handle, whole_chunk) {
Err(e) => Response::builder()
.status(StatusCode::BAD_REQUEST)