diff --git a/rustbus/src/connection/ll_conn.rs b/rustbus/src/connection/ll_conn.rs index b3d7366..fca6ff5 100644 --- a/rustbus/src/connection/ll_conn.rs +++ b/rustbus/src/connection/ll_conn.rs @@ -80,7 +80,7 @@ impl IncomingBuffer { fn take(&mut self) -> Vec { self.buf.truncate(self.filled); self.filled = 0; - std::mem::replace(&mut self.buf, Vec::new()) + std::mem::take(&mut self.buf) } fn peek(&self) -> &[u8] {