diff --git a/distant-core/src/net/transport/inmemory.rs b/distant-core/src/net/transport/inmemory.rs index e6822f9..9288c16 100644 --- a/distant-core/src/net/transport/inmemory.rs +++ b/distant-core/src/net/transport/inmemory.rs @@ -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(()),