hyperium / http

Rust HTTP types
Apache License 2.0
1.12k stars 283 forks source link

HeaderMap::try_with_capacity can panic when capacity is large #709

Open dlzht opened 4 days ago

dlzht commented 4 days ago

In PR #617, try_methods are provided to prevent the panic In PR #628, capacity overflow is resolve but introduce panic

Just like implementation in hashbrown, maybe to_raw_capacity can return Option<usize> too.