RustCrypto / utils

Utility crates used in RustCrypto
428 stars 127 forks source link

hybrid-array: make `ArrayOps` better resemble core arrays #1003

Closed tarcieri closed 8 months ago

tarcieri commented 8 months ago

...and asserts as much by impl'ing the trait for core arrays.

The main notable change is bounding on AsRef<[T]>/AsMut<[T]>, which core arrays do impl, however they don't actually impl AsRef<[T; N]>/AsMut<[T; N]>.

Those impls are retained on Array, but new ones added for AsRef<[T]>/AsMut<[T]>, providing better parity with core arrays.