Skip to content

Conversation

@wqfish
Copy link
Contributor

@wqfish wqfish commented Sep 9, 2025

The current implementation fails with "Hash table capacity overflow" because it uses the old table's capacity to reserve capacity for the new table. For unbounded cache, its capacity is usize::MAX, so it's too large for HashMap::with_capacity.

The current implementation fails with "Hash table capacity overflow" because it
uses the old table's capacity to reserve capacity for the new table. For
unbounded cache, its capacity is `usize::MAX`, so it's too large for
`HashMap::with_capacity`.
@jeromefroe jeromefroe merged commit 1b21bf1 into jeromefroe:master Sep 9, 2025
4 checks passed
@jeromefroe
Copy link
Owner

Thanks for the fix @wqfish!

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.

2 participants