-
Notifications
You must be signed in to change notification settings - Fork 30
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
Consider adding Eq
where possible
#296
Comments
The additional semantic requirements for
The type system will enforce that the bag-of-bytes types can only be compared with the same type, which guarantees that the underlying bytes semantically mean the same thing and that we're not, for example, comparing a private key and a hash. That's the only thing I can think of that might break one of the above properties, and it's not an issue. |
Just for reference, clippy suggests the additional
Good points @vlmutolo. Seems like this shouldn't be too much of an issue then. |
In the const generics refactor, the byte containers will all look like I imagine we'll want to implement |
Do you think it'd be better to postpone this to post const-generics, that you've been working on @vlmutolo? |
I think we can go ahead and add this in the current implementation. I'll also make sure to add it in the const-generics branch. |
When
#[warn(clippy::derive_partial_eq_without_eq)]
is enabled, clippy will suggest to addEq
to some types. We should make sure this makes sense before we add this, because removing them later will be a breaking change.The text was updated successfully, but these errors were encountered: