Skip to content

Conversation

@cormacrelf
Copy link

@cormacrelf cormacrelf commented Nov 27, 2025

Fixes #302.

Note that the discussion in that issue is really an argument that Store's PartialEq is transitive, in light of the new Run store type. Array can equal Run, and Run can equal Bitmap, but Array != Bitmap always. But if you have an array and a bitmap then the lengths are different, so at least one of A==R or R==B must also be false for any given R and you don't violate transitivity. Essentially the PartialEq is valid, which is a prereq to Eq.

We're adding Eq, and for that all you need to know is that a store will equal itself. We handle A==A, B==B and R==R just fine.

This ensures if we ever added another variant, we would have to consider the variants
in PartialEq.
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.

Implement Eq

1 participant