Implement @smores56's feedback from #7156

This commit is contained in:
Richard Feldman 2024-10-13 11:16:50 -04:00
parent 62b4fe6943
commit 08b32927f1
No known key found for this signature in database
GPG key ID: DAC334802F365236
2 changed files with 14 additions and 14 deletions

View file

@ -61,12 +61,12 @@ impl<T> Slice<T> {
self.start += amount
}
pub fn get_slice<'a>(&self, slice: &'a [T]) -> &'a [T] {
&slice[self.indices()]
pub fn get_slice<'a>(&self, elems: &'a [T]) -> &'a [T] {
&elems[self.indices()]
}
pub fn get_slice_mut<'a>(&self, slice: &'a mut [T]) -> &'a mut [T] {
&mut slice[self.indices()]
pub fn get_slice_mut<'a>(&self, elems: &'a mut [T]) -> &'a mut [T] {
&mut elems[self.indices()]
}
#[inline(always)]