@@ -112,7 +112,7 @@ use typenum::{Diff, Sum};
112
112
use zeroize:: { Zeroize , ZeroizeOnDrop } ;
113
113
114
114
/// Type alias for [`Array`] which is const generic around a size `N`, ala `[T; N]`.
115
- pub type ArrayN < T , const N : usize > = Array < T , <[ T ; N ] as AssociatedArraySize >:: Size > ;
115
+ pub type ArrayN < T , const N : usize > = Array < T , <[ T ; N ] as AssocArraySize >:: Size > ;
116
116
117
117
/// [`Array`] is a newtype for an inner `[T; N]` array where `N` is determined by a generic
118
118
/// [`ArraySize`] parameter, which is a marker trait for a numeric value determined by ZSTs that
@@ -134,25 +134,25 @@ pub type ArrayN<T, const N: usize> = Array<T, <[T; N] as AssociatedArraySize>::S
134
134
/// The [`AsRef`] trait can be used to convert from `&Array<T, U>` to `&[T; N]` and vice versa:
135
135
///
136
136
/// ```
137
- /// use hybrid_array::{Array, ArraySize, AssociatedArraySize , ArrayN, consts::U3};
137
+ /// use hybrid_array::{Array, ArraySize, AssocArraySize , ArrayN, consts::U3};
138
138
///
139
139
/// pub fn get_third_item_hybrid_array<T, U: ArraySize>(arr_ref: &Array<T, U>) -> &T {
140
140
/// &arr_ref[2]
141
141
/// }
142
142
///
143
143
/// pub fn get_third_item_const_generic<T, const N: usize>(arr_ref: &[T; N]) -> &T
144
144
/// where
145
- /// [T; N]: AssociatedArraySize + AsRef<ArrayN<T, N>>
145
+ /// [T; N]: AssocArraySize + AsRef<ArrayN<T, N>>
146
146
/// {
147
147
/// get_third_item_hybrid_array(arr_ref.as_ref())
148
148
/// }
149
149
///
150
150
/// assert_eq!(get_third_item_const_generic(&[1u8, 2, 3, 4]), &3);
151
151
/// ```
152
152
///
153
- /// Note that the [`AssociatedArraySize `] trait can be used to determine the appropriate
153
+ /// Note that the [`AssocArraySize `] trait can be used to determine the appropriate
154
154
/// [`Array`] size for a given `[T; N]`, and the [`ArrayN`] trait (which internally uses
155
- /// [`AssociatedArraySize `]) can be used to determine the specific [`Array`] type for a given
155
+ /// [`AssocArraySize `]) can be used to determine the specific [`Array`] type for a given
156
156
/// const generic size.
157
157
#[ repr( transparent) ]
158
158
pub struct Array < T , U : ArraySize > ( pub U :: ArrayType < T > ) ;
0 commit comments