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

reverts use of NonZeroUsize for LRU capacity instead of usize #176

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

behzadnouri
Copy link

NonZeroUsize for capacity is very nonergonomic and prevents some use-cases. For example a usize allows to disable caching by using capacity zero. see: #165

This reverts commit 0e415ef.

NonZeroUsize for capacity is very nonergonomic and prevents some
use-cases. For example a usize allows to disable caching by using
capacity zero. see: jeromefroe#165

This reverts commit 0e415ef.
@behzadnouri
Copy link
Author

With this change get_or_insert, get_or_insert_mut and try_get_or_insert now may return None if the capacity is zero.
That is addressed in #177.

@jeromefroe

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.

1 participant