Fix findings from cargo clippy.

This commit is contained in:
Jacob Hoffman-Andrews
2020-06-12 21:17:58 -07:00
committed by Martin Algesten
parent b4c15eef2c
commit 378ef57636
4 changed files with 10 additions and 15 deletions

View File

@@ -125,7 +125,7 @@ fn copy_chunked<R: Read, W: Write>(reader: &mut R, writer: &mut W) -> IoResult<u
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(&header).unwrap();
(&mut chunk[start_index..]).write_all(&header).unwrap();
// And add the footer
chunk.extend_from_slice(b"\r\n");