Fix clippy

This commit is contained in:
Jacob Hoffman-Andrews
2022-12-08 12:15:54 -08:00
committed by Martin Algesten
parent 6bef9daa8e
commit a8ca1ec085

View File

@@ -125,7 +125,7 @@ where
// Copy the prelude into the buffer. For small chunks, this won't necessarily // Copy the prelude into the buffer. For small chunks, this won't necessarily
// take up all the space that was reserved for the prelude. // take up all the space that was reserved for the prelude.
let offset = MAX_HEADER_SIZE - prelude.len(); let offset = MAX_HEADER_SIZE - prelude.len();
self.buffer[offset..MAX_HEADER_SIZE].clone_from_slice(&prelude); self.buffer[offset..MAX_HEADER_SIZE].clone_from_slice(prelude);
// Append the chunk-finishing \r\n to the buffer. // Append the chunk-finishing \r\n to the buffer.
self.buffer.write_all(b"\r\n")?; self.buffer.write_all(b"\r\n")?;