Skip to content

Commit b45a696

Browse files
committed
Add a test for #2157
1 parent 24f1f69 commit b45a696

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

tests/source/chains.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ fn main() {
5353
.map(|x| x / 2)
5454
.fold(0, |acc, x| acc + x);
5555

56+
body.fold(Body::new(), |mut body, chunk| {
57+
body.extend(chunk);
58+
Ok(body)
59+
}).and_then(move |body| {
60+
let req = Request::from_parts(parts, body);
61+
f(req).map_err(|_| io::Error::new(io::ErrorKind::Other, ""))
62+
});
63+
5664
aaaaaaaaaaaaaaaa.map(|x| {
5765
x += 1;
5866
x

tests/target/chains.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ fn main() {
5454
let suuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuum =
5555
xxxxxxx.map(|x| x + 5).map(|x| x / 2).fold(0, |acc, x| acc + x);
5656

57+
body.fold(Body::new(), |mut body, chunk| {
58+
body.extend(chunk);
59+
Ok(body)
60+
}).and_then(move |body| {
61+
let req = Request::from_parts(parts, body);
62+
f(req).map_err(|_| io::Error::new(io::ErrorKind::Other, ""))
63+
});
64+
5765
aaaaaaaaaaaaaaaa
5866
.map(|x| {
5967
x += 1;

0 commit comments

Comments
 (0)