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

deprecate CollectionType#collections? #4434

Merged
merged 2 commits into from
Jul 13, 2020
Merged

Conversation

no-reply
Copy link
Contributor

adjust semantics of collection checking from #count.positive? to #any?. for
most enumerables, #count.positive? will involve touching all the objects in the
enumerator. instead, use #any? which lets the enumerator optimize checking for
presence.

while we're at it, deprecate the entire method and advise users to use #any?
instead.

@samvera/hyrax-code-reviewers

tamsin johnson added 2 commits July 13, 2020 13:35
adjust semantics of collection checking from `#count.positive?` to `#any?`. for
most enumerables, `#count.positive?` will involve touching all the objects in the
enumerator. instead, use `#any?` which lets the enumerator optimize checking for
presence.

while we're at it, deprecate the entire method and advise users to use `#any?`
instead.
@no-reply no-reply merged commit 0a553ec into master Jul 13, 2020
@jeremyf jeremyf deleted the collection-type-count branch July 13, 2020 21:14
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