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

Implement Eq #302

Open
414owen opened this issue Dec 4, 2024 · 0 comments
Open

Implement Eq #302

414owen opened this issue Dec 4, 2024 · 0 comments

Comments

@414owen
Copy link

414owen commented Dec 4, 2024

RoaringBitmap has a PartialEq instance, but no Eq instance.
PartialEq doesn't guarantee reflexivity.
The PartialEq here is your standard, derived, structural equality, until we reach the Store type, where we do this, comparing equivalent storage types piecewise.

Judging by the spec, containers with equal elements should also be stored in the same type of backing store, an array for up to 4096 ints, and a 2^16 bit bitmap otherwise.

This should, if I'm reading this right, mean PartialEq is in fact reflexive.
This means an Eq instance would make sense.

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

No branches or pull requests

1 participant