refactor: use `Poll::map_err` on compression module
`Poll::map_err` is stabilized since 1.51.0
https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1510-2021-03-25
Diff
src/compression.rs | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
@@ -161,9 +161,7 @@ where
use std::io::{Error, ErrorKind};
let pin = self.project();
S::poll_next(pin.body, ctx)
.map(|err| err.map(|res| res.map_err(|_| Error::from(ErrorKind::InvalidData))))
S::poll_next(pin.body, ctx).map_err(|_| Error::from(ErrorKind::InvalidData))
}
}