Skip to content

Commit 2541570

Browse files
authored
Merge pull request rust-lang#152 from stepancheg/take-err
Stream::take should count errors too
2 parents a1f1c78 + 9964e29 commit 2541570

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/stream/take.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl<S> Stream for Take<S>
3030
Ok(Async::Ready(None))
3131
} else {
3232
match self.stream.poll() {
33-
e @ Ok(Async::Ready(Some(_))) => {
33+
e @ Ok(Async::Ready(Some(_))) | e @ Err(_) => {
3434
self.remaining -= 1;
3535
e
3636
}

0 commit comments

Comments
 (0)