Skip to content

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

Open
behzadnouri wants to merge 1 commit intojeromefroe:masterfrom
behzadnouri:revert-non-zero-usize
Open

reverts use of NonZeroUsize for LRU capacity instead of usize#176
behzadnouri wants to merge 1 commit intojeromefroe:masterfrom
behzadnouri:revert-non-zero-usize

Conversation

@behzadnouri
Copy link
Copy Markdown

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
Copy Markdown
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