Skip to content

Commit 38a6809

Browse files
committed
small improve
1 parent b6eed5d commit 38a6809

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gz/bufread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ impl<R: BufRead> GzDecoder<R> {
346346
/// Creates a new decoder from the given reader, immediately parsing the
347347
/// gzip header.
348348
pub fn new(mut r: R) -> GzDecoder<R> {
349-
let mut buf = Vec::new();
349+
let mut buf = Vec::with_capacity(10); // minimum header length
350350
let mut header = None;
351351

352352
let result = {

0 commit comments

Comments
 (0)