Skip to content

Commit 05b781a

Browse files
authored
Simplify s![]
Fixes rust-ndarray#1194
1 parent f8522cf commit 05b781a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/slice.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -842,15 +842,11 @@ macro_rules! s(
842842
}
843843
};
844844
// empty call, i.e. `s![]`
845-
(@parse ::core::marker::PhantomData::<$crate::Ix0>, ::core::marker::PhantomData::<$crate::Ix0>, []) => {
845+
(@parse $in_dim:expr, $out_dim:expr, []) => {
846846
{
847847
#[allow(unsafe_code)]
848848
unsafe {
849-
$crate::SliceInfo::new_unchecked(
850-
[],
851-
::core::marker::PhantomData::<$crate::Ix0>,
852-
::core::marker::PhantomData::<$crate::Ix0>,
853-
)
849+
$crate::SliceInfo::new_unchecked([], $in_dim, $out_dim)
854850
}
855851
}
856852
};

0 commit comments

Comments
 (0)