Skip to content

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

Description

@dlzht

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions