diff --git a/src/header/map.rs b/src/header/map.rs index 7610175b..07b4554a 100644 --- a/src/header/map.rs +++ b/src/header/map.rs @@ -521,7 +521,7 @@ impl HeaderMap { Ok(HeaderMap { mask: (raw_cap - 1) as Size, indices: vec![Pos::none(); raw_cap].into_boxed_slice(), - entries: Vec::with_capacity(raw_cap), + entries: Vec::with_capacity(usable_capacity(raw_cap)), extra_values: Vec::new(), danger: Danger::Green, })