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

hybrid-array: implement concat and split methods #958

Merged
merged 1 commit into from
Oct 14, 2023

Conversation

rpiasetskyi
Copy link
Contributor

These traits add convenient methods for concatenation and splitting. The size of the result is calculated in the compile time.

This implementation was inspired by GenericArray implementation of relevant traits.

This change is necessary for RustCrypto/traits#1078

@tarcieri
Copy link
Member

tarcieri commented Oct 13, 2023

Is there a particular reason to implement these in terms of traits instead of inherent methods? (other than that's what generic-array did)

It seems like since they're impl'd for Array universally, having them just be inherent methods would skip the step of having to import traits.

Convenient methods for concatenation and splitting. The size of the
result is calculated in the compile time.

This implementation was inspired by GenericArray implementation of
Concat and Split traits.
@tarcieri tarcieri changed the title hybrid-array: implement Concat and Split hybrid-array: implement concat and split methods Oct 14, 2023
@tarcieri tarcieri merged commit 840f11b into RustCrypto:master Oct 14, 2023
11 checks passed
rpiasetskyi added a commit to rpiasetskyi/utils that referenced this pull request Oct 16, 2023
Convenient methods for concatenation and splitting. The size of the
result is calculated in the compile time.

This implementation was inspired by GenericArray implementation of
Concat and Split traits.

Co-authored-by: Ruslan Piasetskyi <ruslan.piasetskyi0@gmail.com>
tarcieri pushed a commit that referenced this pull request Oct 16, 2023
Convenient methods for concatenation and splitting. The size of the
result is calculated in the compile time.

This implementation was inspired by GenericArray implementation of
Concat and Split traits.

Co-authored-by: Ruslan Piasetskyi <ruslan.piasetskyi0@gmail.com>
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