@@ -56,7 +56,7 @@ pub trait ArrayOps<T, const N: usize>:
5656 /// [`ArraySize`] type: `typenum`-provided [`Unsigned`] integer.
5757 ///
5858 /// Not to be confused with [`ArrayOps::SIZE`], which is a `usize`.
59- type Size : ArraySize < T > ;
59+ type Size : ArraySize ;
6060
6161 /// Returns a reference to the inner array.
6262 fn as_array_ref ( & self ) -> & [ T ; N ] ;
@@ -106,15 +106,15 @@ pub trait ArrayOps<T, const N: usize>:
106106
107107/// Trait which associates a [`usize`] size and `ArrayType` with a
108108/// `typenum`-provided [`Unsigned`] integer.
109- pub trait ArraySize < T > : Unsigned {
109+ pub trait ArraySize : Unsigned {
110110 /// Array type which corresponds to this size.
111- type ArrayType : AsRef < [ T ] > + AsMut < [ T ] > + IntoArray < T > + Sized ;
111+ type ArrayType < T > : AsRef < [ T ] > + AsMut < [ T ] > + IntoArray < T > + Sized ;
112112}
113113
114114/// Convert the given type into an [`Array`].
115115pub trait IntoArray < T > {
116116 /// Size of the [`Array`].
117- type Size : ArraySize < T > ;
117+ type Size : ArraySize ;
118118
119119 /// Convert into the `hybrid-array` crate's [`Array`] type.
120120 fn into_hybrid_array ( self ) -> Array < T , Self :: Size > ;
@@ -157,8 +157,8 @@ macro_rules! impl_array_size {
157157 }
158158 }
159159
160- impl < T > ArraySize < T > for typenum:: $ty {
161- type ArrayType = [ T ; $len] ;
160+ impl ArraySize for typenum:: $ty {
161+ type ArrayType < T > = [ T ; $len] ;
162162 }
163163
164164 impl <T > IntoArray <T > for [ T ; $len] {
@@ -290,11 +290,11 @@ impl_array_size! {
290290/// allowing interoperability and a transition path to const generics.
291291#[ derive( Copy , Clone , Debug , Eq , Hash , PartialEq , PartialOrd , Ord ) ]
292292#[ repr( transparent) ]
293- pub struct Array < T , U : ArraySize < T > > ( pub U :: ArrayType ) ;
293+ pub struct Array < T , U : ArraySize > ( pub U :: ArrayType < T > ) ;
294294
295295impl < T , U > Array < T , U >
296296where
297- U : ArraySize < T > ,
297+ U : ArraySize ,
298298{
299299 /// Returns a slice containing the entire array. Equivalent to `&s[..]`.
300300 #[ inline]
@@ -312,7 +312,7 @@ where
312312impl < T , U , const N : usize > AsRef < [ T ; N ] > for Array < T , U >
313313where
314314 Self : ArrayOps < T , N > ,
315- U : ArraySize < T > ,
315+ U : ArraySize ,
316316{
317317 #[ inline]
318318 fn as_ref ( & self ) -> & [ T ; N ] {
@@ -323,7 +323,7 @@ where
323323impl < T , U , const N : usize > AsMut < [ T ; N ] > for Array < T , U >
324324where
325325 Self : ArrayOps < T , N > ,
326- U : ArraySize < T > ,
326+ U : ArraySize ,
327327{
328328 #[ inline]
329329 fn as_mut ( & mut self ) -> & mut [ T ; N ] {
@@ -334,7 +334,7 @@ where
334334impl < T , U , const N : usize > Borrow < [ T ; N ] > for Array < T , U >
335335where
336336 Self : ArrayOps < T , N > ,
337- U : ArraySize < T > ,
337+ U : ArraySize ,
338338{
339339 #[ inline]
340340 fn borrow ( & self ) -> & [ T ; N ] {
@@ -345,7 +345,7 @@ where
345345impl < T , U , const N : usize > BorrowMut < [ T ; N ] > for Array < T , U >
346346where
347347 Self : ArrayOps < T , N > ,
348- U : ArraySize < T > ,
348+ U : ArraySize ,
349349{
350350 #[ inline]
351351 fn borrow_mut ( & mut self ) -> & mut [ T ; N ] {
@@ -356,7 +356,7 @@ where
356356impl < T , U , const N : usize > From < [ T ; N ] > for Array < T , U >
357357where
358358 Self : ArrayOps < T , N > ,
359- U : ArraySize < T > ,
359+ U : ArraySize ,
360360{
361361 #[ inline]
362362 fn from ( arr : [ T ; N ] ) -> Array < T , U > {
@@ -367,7 +367,7 @@ where
367367impl < T , I , U > Index < I > for Array < T , U >
368368where
369369 [ T ] : Index < I > ,
370- U : ArraySize < T > ,
370+ U : ArraySize ,
371371{
372372 type Output = <[ T ] as Index < I > >:: Output ;
373373
@@ -380,7 +380,7 @@ where
380380impl < T , I , U > IndexMut < I > for Array < T , U >
381381where
382382 [ T ] : IndexMut < I > ,
383- U : ArraySize < T > ,
383+ U : ArraySize ,
384384{
385385 #[ inline]
386386 fn index_mut ( & mut self , index : I ) -> & mut Self :: Output {
@@ -391,8 +391,8 @@ where
391391impl < ' a , T , U > TryFrom < & ' a [ T ] > for Array < T , U >
392392where
393393 T : Copy ,
394- U : ArraySize < T > ,
395- U :: ArrayType : TryFrom < & ' a [ T ] , Error = TryFromSliceError > ,
394+ U : ArraySize ,
395+ U :: ArrayType < T > : TryFrom < & ' a [ T ] , Error = TryFromSliceError > ,
396396{
397397 type Error = TryFromSliceError ;
398398
0 commit comments