Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dlzht opened this issue Jul 2, 2024 · 0 comments
Open

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

dlzht opened this issue Jul 2, 2024 · 0 comments

Comments

@dlzht
Copy link

dlzht commented Jul 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant