compression: minor cleanup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2022-07-05 12:13:38 +02:00
parent 6e989a1c29
commit cc6e5d7372

View File

@ -95,10 +95,7 @@ where
match this.state {
EncoderState::Reading => {
if let Some(res) = ready!(Pin::new(&mut this.inner).poll_next(cx)) {
let buf = match res {
Ok(buf) => buf,
Err(err) => return Poll::Ready(Some(Err(err.into()))),
};
let buf = res.map_err(Into::into)?;
this.input_buffer = buf.into();
this.state = EncoderState::Writing;
} else {