Skip to content

Commit

Permalink
Replace BufMut::put with BufMut::put_slice in Writer impl (#745)
Browse files Browse the repository at this point in the history
  • Loading branch information
paolobarbolini authored Nov 1, 2024
1 parent 2d996a2 commit 4cd8969
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/buf/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl<B: BufMut + Sized> io::Write for Writer<B> {
fn write(&mut self, src: &[u8]) -> io::Result<usize> {
let n = cmp::min(self.buf.remaining_mut(), src.len());

self.buf.put(&src[0..n]);
self.buf.put_slice(&src[..n]);
Ok(n)
}

Expand Down

0 comments on commit 4cd8969

Please sign in to comment.