Skip to content

Commit

Permalink
Remove needless borrow
Browse files Browse the repository at this point in the history
  • Loading branch information
frewsxcv committed Dec 27, 2022
1 parent 634e365 commit 6535c26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ where
// Copy the prelude into the buffer. For small chunks, this won't necessarily
// take up all the space that was reserved for the prelude.
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.
self.buffer.write_all(b"\r\n")?;
Expand Down

0 comments on commit 6535c26

Please sign in to comment.