Add a test for #2157

This commit is contained in:
Seiichi Uchida 2017-12-05 10:02:49 +09:00
parent 24f1f69d5a
commit b45a69699a
2 changed files with 16 additions and 0 deletions

View file

@ -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

View file

@ -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;