Skip to content

docs(header): correct HeaderMap max capacity and clarify reserve panic - #865

Merged
seanmonstar merged 1 commit into
hyperium:masterfrom
ChrisJr404:docs-headermap-max-capacity
Aug 25, 2026
Merged

docs(header): correct HeaderMap max capacity and clarify reserve panic#865
seanmonstar merged 1 commit into
hyperium:masterfrom
ChrisJr404:docs-headermap-max-capacity

Conversation

@ChrisJr404

Copy link
Copy Markdown
Contributor

Closes #603.

The # Limitations section said a HeaderMap can hold 32,768 entries, but inserts actually start failing at 24,576 (that is usable_capacity(MAX_SIZE)), which is the number the original reporter hit. I corrected the count and pointed the section at the fallible try_insert / try_append / try_reserve methods so there is a clear way to stay under the limit without panicking.

I also reworded the reserve panic note. It referenced the private MAX_SIZE constant, so it now points at the type docs and try_reserve instead.

Docs only, no behavior change.

@seanmonstar
seanmonstar merged commit d120fd9 into hyperium:master Aug 25, 2026
10 checks passed
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

Successfully merging this pull request may close these issues.

Undocumented capacity limit for HeaderMap

3 participants