From 4cd8969e850d0a66b181c388ead281c37d360621 Mon Sep 17 00:00:00 2001 From: Paolo Barbolini Date: Fri, 1 Nov 2024 19:22:07 +0100 Subject: [PATCH] Replace `BufMut::put` with `BufMut::put_slice` in Writer impl (#745) --- src/buf/writer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/buf/writer.rs b/src/buf/writer.rs index 08f15d20e..e72348f40 100644 --- a/src/buf/writer.rs +++ b/src/buf/writer.rs @@ -78,7 +78,7 @@ impl io::Write for Writer { fn write(&mut self, src: &[u8]) -> io::Result { let n = cmp::min(self.buf.remaining_mut(), src.len()); - self.buf.put(&src[0..n]); + self.buf.put_slice(&src[..n]); Ok(n) }