From d855c707cd8fc44ab42aa3c0155306e6d87a805c Mon Sep 17 00:00:00 2001 From: Roland Fredenhagen <dev@modprog.de> Date: Sun, 23 Apr 2023 09:39:00 +0200 Subject: [PATCH] fix workaround false positive clippy lint `reversed_empty_ranges` --- src/slice.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/slice.rs b/src/slice.rs index 0146d6dba..c5c448aa7 100644 --- a/src/slice.rs +++ b/src/slice.rs @@ -867,12 +867,16 @@ macro_rules! s( ) }; ($($t:tt)*) => { - $crate::s![@parse - ::core::marker::PhantomData::<$crate::Ix0>, - ::core::marker::PhantomData::<$crate::Ix0>, - [] - $($t)* - ] + { + #[allow(clippy::reversed_empty_ranges)] + let slice = $crate::s![@parse + ::core::marker::PhantomData::<$crate::Ix0>, + ::core::marker::PhantomData::<$crate::Ix0>, + [] + $($t)* + ]; + slice + } }; );