From 574235c272bb7f0452f4fd694e55510a7ca59688 Mon Sep 17 00:00:00 2001 From: Ben Kimock Date: Tue, 20 Feb 2024 18:43:33 -0500 Subject: [PATCH] Tweak inlining attributes for slice indexing --- library/core/src/slice/index.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/core/src/slice/index.rs b/library/core/src/slice/index.rs index 0e2d45c4ada6d..a7ad1a11c6ce8 100644 --- a/library/core/src/slice/index.rs +++ b/library/core/src/slice/index.rs @@ -13,7 +13,7 @@ where { type Output = I::Output; - #[inline(always)] + #[inline] fn index(&self, index: I) -> &I::Output { index.index(self) } @@ -24,7 +24,7 @@ impl ops::IndexMut for [T] where I: SliceIndex<[T]>, { - #[inline(always)] + #[inline] fn index_mut(&mut self, index: I) -> &mut I::Output { index.index_mut(self) } @@ -390,7 +390,7 @@ unsafe impl SliceIndex<[T]> for ops::Range { } } - #[inline(always)] + #[inline] fn index(self, slice: &[T]) -> &[T] { if self.start > self.end { slice_index_order_fail(self.start, self.end); @@ -440,7 +440,7 @@ unsafe impl SliceIndex<[T]> for ops::RangeTo { unsafe { (0..self.end).get_unchecked_mut(slice) } } - #[inline(always)] + #[inline] fn index(self, slice: &[T]) -> &[T] { (0..self.end).index(slice) }