Fix clippy warning

This commit is contained in:
Chip Senkbeil 2021-10-10 02:46:51 -05:00
parent 3d09ced685
commit bd526c9c82
No known key found for this signature in database
GPG Key ID: 35EF1F8EC72A4131

View File

@ -120,10 +120,8 @@ impl AsyncRead for InmemoryStreamReadHalf {
Some(mut x) => {
if x.len() > buf.remaining() {
self.overflow = x.split_off(buf.remaining());
buf.put_slice(&x);
} else {
buf.put_slice(&x);
}
buf.put_slice(&x);
Ok(())
}
None => Ok(()),