diff --git a/src/impls.rs b/src/impls.rs index ae6b3b47..1ac66de5 100644 --- a/src/impls.rs +++ b/src/impls.rs @@ -61,29 +61,14 @@ impl_metadata_for_primitives!( i128 => TypeDefPrimitive::I128, ); -macro_rules! impl_metadata_for_array { - ( $( $n:expr )* ) => { - $( - impl TypeInfo for [T; $n] { - type Identity = Self; - - fn type_info() -> Type { - TypeDefArray::new($n, MetaType::new::()).into() - } - } - )* +impl TypeInfo for [T; N] { + type Identity = Self; + + fn type_info() -> Type { + TypeDefArray::new(N as u32, MetaType::new::()).into() } } -#[rustfmt::skip] -impl_metadata_for_array!( - 1 2 3 4 5 6 7 8 9 - 10 11 12 13 14 15 16 17 18 19 - 20 21 22 23 24 25 26 27 28 29 - 30 31 32 - 40 48 56 64 72 96 128 160 192 224 256 -); - macro_rules! impl_metadata_for_tuple { ( $($ty:ident),* ) => { impl<$($ty),*> TypeInfo for ($($ty,)*)