Skip to content

Commit 7c32c62

Browse files
aprilwadenovacrazy
authored andcommitted
Allow arr! to be imported with use syntax
1 parent 1f59ef7 commit 7c32c62

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/arr.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ macro_rules! arr_impl {
2929
unsafe { $crate::transmute::<_, $crate::GenericArray<$T, $N>>([$($x),*]) }
3030
});
3131
($T:ty; $N:ty, [], [$x1:expr]) => (
32-
arr_impl!($T; $crate::arr::Inc<$T, $N>, [$x1 as $T], [])
32+
$crate::arr_impl!($T; $crate::arr::Inc<$T, $N>, [$x1 as $T], [])
3333
);
3434
($T:ty; $N:ty, [], [$x1:expr, $($x:expr),+]) => (
35-
arr_impl!($T; $crate::arr::Inc<$T, $N>, [$x1 as $T], [$($x),+])
35+
$crate::arr_impl!($T; $crate::arr::Inc<$T, $N>, [$x1 as $T], [$($x),+])
3636
);
3737
($T:ty; $N:ty, [$($y:expr),+], [$x1:expr]) => (
38-
arr_impl!($T; $crate::arr::Inc<$T, $N>, [$($y),+, $x1 as $T], [])
38+
$crate::arr_impl!($T; $crate::arr::Inc<$T, $N>, [$($y),+, $x1 as $T], [])
3939
);
4040
($T:ty; $N:ty, [$($y:expr),+], [$x1:expr, $($x:expr),+]) => (
41-
arr_impl!($T; $crate::arr::Inc<$T, $N>, [$($y),+, $x1 as $T], [$($x),+])
41+
$crate::arr_impl!($T; $crate::arr::Inc<$T, $N>, [$($y),+, $x1 as $T], [$($x),+])
4242
);
4343
}
4444

@@ -50,7 +50,7 @@ macro_rules! arr {
5050
unsafe { $crate::transmute::<[$T; 0], $crate::GenericArray<$T, $crate::typenum::U0>>([]) }
5151
});
5252
($T:ty; $($x:expr),* $(,)*) => (
53-
arr_impl!($T; $crate::typenum::U0, [], [$($x),*])
53+
$crate::arr_impl!($T; $crate::typenum::U0, [], [$($x),*])
5454
);
5555
($($x:expr,)+) => (arr![$($x),*]);
5656
() => ("""Macro requires a type, e.g. `let array = arr![u32; 1, 2, 3];`")

0 commit comments

Comments
 (0)