From e2eb2ee5aef33bb9325bad94e01240350120faa7 Mon Sep 17 00:00:00 2001 From: Moritz Borcherding Date: Tue, 27 Feb 2024 16:36:16 +0100 Subject: [PATCH] make clippy happy --- rustbus/src/connection/ll_conn.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] {