Skip to content

Commit

Permalink
hybrid-array: tweak ArraySize docs, remove static bound (#976)
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov authored Oct 27, 2023
1 parent 316f864 commit 6c39ebb
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions hybrid-array/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -605,13 +605,11 @@ impl<T, const N: usize> ArrayExt<T> for [T; N] {
/// # Safety
///
/// `ArrayType` MUST be an array with a number of elements exactly equal to
/// [`Unsigned::USIZE`].
/// [`Unsigned::USIZE`]. Breaking this requirement will cause undefined behavior.
///
/// Failure to so will cause undefined behavior.
///
/// NOTE: do not implement this trait yourself. It is implemented for types in
/// [`typenum::consts`].
pub unsafe trait ArraySize: Unsigned + 'static {
/// NOTE: This trait is effectively sealed and can not be implemented by third-party crates.
/// 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> + AsRef<[T]> + AsMut<[T]> + IntoArray<T> + IntoIterator<Item = T>;
}
Expand Down

0 comments on commit 6c39ebb

Please sign in to comment.