Skip to content

Commit

Permalink
hybrid-array: add From<Array<T, U>> bound to ArraySize (#1007)
Browse files Browse the repository at this point in the history
Specifically to `ArraySize::ArrayType`
  • Loading branch information
tarcieri committed Dec 30, 2023
1 parent 63ba0eb commit 52dd5b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hybrid-array/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,11 @@ impl<T, const N: usize> ArrayExt<T> for [T; N] {
/// It is implemented only for a number of types defined in [`typenum::consts`].
pub unsafe trait ArraySize: Unsigned {
/// Array type which corresponds to this size.
type ArrayType<T>: ArrayExt<T> + Into<Array<T, Self>> + IntoIterator<Item = T> + SliceOps<T>;
type ArrayType<T>: ArrayExt<T>
+ From<Array<T, Self>>
+ Into<Array<T, Self>>
+ IntoIterator<Item = T>
+ SliceOps<T>;
}

/// Associates an [`ArraySize`] with a given type.
Expand Down

0 comments on commit 52dd5b1

Please sign in to comment.