Skip to content

Commit d855c70

Browse files
committed
fix workaround false positive clippy lint reversed_empty_ranges
1 parent 0740695 commit d855c70

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/slice.rs

+10-6
Original file line numberDiff line numberDiff line change
@@ -867,12 +867,16 @@ macro_rules! s(
867867
)
868868
};
869869
($($t:tt)*) => {
870-
$crate::s![@parse
871-
::core::marker::PhantomData::<$crate::Ix0>,
872-
::core::marker::PhantomData::<$crate::Ix0>,
873-
[]
874-
$($t)*
875-
]
870+
{
871+
#[allow(clippy::reversed_empty_ranges)]
872+
let slice = $crate::s![@parse
873+
::core::marker::PhantomData::<$crate::Ix0>,
874+
::core::marker::PhantomData::<$crate::Ix0>,
875+
[]
876+
$($t)*
877+
];
878+
slice
879+
}
876880
};
877881
);
878882

0 commit comments

Comments
 (0)