From: Seiichi Uchida Date: Tue, 5 Dec 2017 01:02:49 +0000 (+0900) Subject: Add a test for #2157 X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=b45a69699aa002e3afd764c3900d52f112855362;p=rust.git Add a test for #2157 --- diff --git a/tests/source/chains.rs b/tests/source/chains.rs index 0141326269b..0977212ef21 100644 --- a/tests/source/chains.rs +++ b/tests/source/chains.rs @@ -53,6 +53,14 @@ fn main() { .map(|x| x / 2) .fold(0, |acc, x| acc + x); + body.fold(Body::new(), |mut body, chunk| { + body.extend(chunk); + Ok(body) + }).and_then(move |body| { + let req = Request::from_parts(parts, body); + f(req).map_err(|_| io::Error::new(io::ErrorKind::Other, "")) + }); + aaaaaaaaaaaaaaaa.map(|x| { x += 1; x diff --git a/tests/target/chains.rs b/tests/target/chains.rs index 61ba04347e0..6e1fc809764 100644 --- a/tests/target/chains.rs +++ b/tests/target/chains.rs @@ -54,6 +54,14 @@ fn main() { let suuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuum = xxxxxxx.map(|x| x + 5).map(|x| x / 2).fold(0, |acc, x| acc + x); + body.fold(Body::new(), |mut body, chunk| { + body.extend(chunk); + Ok(body) + }).and_then(move |body| { + let req = Request::from_parts(parts, body); + f(req).map_err(|_| io::Error::new(io::ErrorKind::Other, "")) + }); + aaaaaaaaaaaaaaaa .map(|x| { x += 1;