[go: nahoru, domu]

Skip to content

Commit

Permalink
refactor: use Poll::map_err on compression filter (seanmonstar#869)
Browse files Browse the repository at this point in the history
  • Loading branch information
joseluisq committed Jun 26, 2021
1 parent b21ce92 commit 84cc807
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/filters/compression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,7 @@ mod internal {
use std::io::{Error, ErrorKind};

let pin = self.project();
// TODO: Use `.map_err()` (https://github.com/rust-lang/rust/issues/63514) once it is stabilized
S::poll_next(pin.body, cx)
.map(|e| e.map(|res| res.map_err(|_| Error::from(ErrorKind::InvalidData))))
S::poll_next(pin.body, cx).map_err(|_| Error::from(ErrorKind::InvalidData))
}
}

Expand Down

0 comments on commit 84cc807

Please sign in to comment.