Skip to content

hybrid-array: implement concat and split methods#958

Merged
tarcieri merged 1 commit intoRustCrypto:masterfrom
rpiasetskyi:hybrid-array-concat-split
Oct 14, 2023
Merged

hybrid-array: implement concat and split methods#958
tarcieri merged 1 commit intoRustCrypto:masterfrom
rpiasetskyi:hybrid-array-concat-split

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.
@rpiasetskyi rpiasetskyi force-pushed the hybrid-array-concat-split branch from 026d7fa to ac7f14d Compare October 14, 2023 00:01
@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
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