mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Implement @smores56's feedback from #7156
This commit is contained in:
parent
62b4fe6943
commit
08b32927f1
2 changed files with 14 additions and 14 deletions
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue