Skip to content

Commit d03a55a

Browse files
authored
Fix inline attributes (#1054)
Before, the nightly compiler warned that the `inline` attributes were unused. Now, it has no warnings.
1 parent 566177b commit d03a55a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/dimension/dimension_trait.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ pub trait Dimension:
379379

380380
macro_rules! impl_insert_axis_array(
381381
($n:expr) => (
382+
#[inline]
382383
fn insert_axis(&self, axis: Axis) -> Self::Larger {
383384
debug_assert!(axis.index() <= $n);
384385
let mut out = [1; $n + 1];
@@ -422,7 +423,6 @@ impl Dimension for Dim<[Ix; 0]> {
422423
fn next_for(&self, _index: Self) -> Option<Self> {
423424
None
424425
}
425-
#[inline]
426426
impl_insert_axis_array!(0);
427427
#[inline]
428428
fn try_remove_axis(&self, _ignore: Axis) -> Self::Smaller {
@@ -530,7 +530,6 @@ impl Dimension for Dim<[Ix; 1]> {
530530
None
531531
}
532532
}
533-
#[inline]
534533
impl_insert_axis_array!(1);
535534
#[inline]
536535
fn try_remove_axis(&self, axis: Axis) -> Self::Smaller {
@@ -694,7 +693,6 @@ impl Dimension for Dim<[Ix; 2]> {
694693
None
695694
}
696695
}
697-
#[inline]
698696
impl_insert_axis_array!(2);
699697
#[inline]
700698
fn try_remove_axis(&self, axis: Axis) -> Self::Smaller {
@@ -814,7 +812,6 @@ impl Dimension for Dim<[Ix; 3]> {
814812
}
815813
order
816814
}
817-
#[inline]
818815
impl_insert_axis_array!(3);
819816
#[inline]
820817
fn try_remove_axis(&self, axis: Axis) -> Self::Smaller {
@@ -845,7 +842,6 @@ macro_rules! large_dim {
845842
assert_eq!(ndim, $n);
846843
Self::default()
847844
}
848-
#[inline]
849845
$($insert_axis)*
850846
#[inline]
851847
fn try_remove_axis(&self, axis: Axis) -> Self::Smaller {

0 commit comments

Comments
 (0)