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

Implementing Eq/PartialEq/Hash for [T; 48] and [T; 64] #61445

Closed
ghost opened this issue Jun 1, 2019 · 2 comments
Closed

Implementing Eq/PartialEq/Hash for [T; 48] and [T; 64] #61445

ghost opened this issue Jun 1, 2019 · 2 comments
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@ghost
Copy link

ghost commented Jun 1, 2019

Currently Eq, PartialEq, Hash are only implemented for slices up to 32 elements: [T; 32].

[T; 48] and [T; 64] are common slices, used for SHA-384, SHA3-384, SHA-512, SHA3-512, KECCAK-512... Could you consider implementing Eq, PartialEq, Hash for `them? This would help library authors a lot.

Thank you,

@Centril Centril added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. C-feature-request Category: A feature request, i.e: not implemented / a PR. labels Jun 1, 2019
@ghost ghost changed the title Implementing Eq/PartialEq/Hash for [T; 64] Implementing Eq/PartialEq/Hash for [T; 48] and [T; 64] Jun 2, 2019
@czipperz
Copy link
Contributor

czipperz commented Jun 2, 2019

I believe [T; N] (for any N) will be generically implemented for those traits soon. See #60466 for more details.

@scottmcm
Copy link
Member

scottmcm commented Jun 2, 2019

Adding more sizes has been rejected before, so with const generics coming soon, I'm going to close this.

(Specifically, #61415 is already tracking making traits like these be implemented for arrays.)

@scottmcm scottmcm closed this as completed Jun 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants