Skip to content

Commit

Permalink
fix: capacity handling in HeaderMap::try_with_capacity (#710)
Browse files Browse the repository at this point in the history
Closes #353
  • Loading branch information
dlzht authored Dec 3, 2024
1 parent 92d4148 commit a753ce4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/header/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ impl<T> HeaderMap<T> {
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,
})
Expand Down

0 comments on commit a753ce4

Please sign in to comment.