Fix clippy warnings

Fix linter warning from clippy about unnecessary borrows - "This expression borrows a reference ... that is immediately dereferenced by the compiler"
This commit is contained in:
Niketh Murali
2021-08-11 03:10:06 +05:30
committed by Martin Algesten
parent eb04d96af8
commit 4665b0aa5a
6 changed files with 15 additions and 15 deletions

View File

@@ -134,7 +134,7 @@ fn copy_chunked<R: Read, W: Write>(reader: &mut R, writer: &mut W) -> io::Result
let header = header_str.as_bytes();
assert!(header.len() <= CHUNK_HEADER_MAX_SIZE);
let start_index = CHUNK_HEADER_MAX_SIZE - header.len();
(&mut chunk[start_index..]).write_all(&header).unwrap();
(&mut chunk[start_index..]).write_all(header).unwrap();
// And add the footer
chunk.extend_from_slice(b"\r\n");