Skip to content

Fix clone implementation for unbounded cache#219

Merged
jeromefroe merged 1 commit intojeromefroe:masterfrom
wqfish:bk
Sep 9, 2025
Merged

Fix clone implementation for unbounded cache#219
jeromefroe merged 1 commit intojeromefroe:masterfrom
wqfish:bk

Conversation

@wqfish
Copy link
Copy Markdown
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
Copy Markdown
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