Rollup merge of #143378 - hkBst:clippy-fix-6, r=tgross35
simplify receivers for some array method calls
This commit is contained in:
commit
e55514bbbe
1 changed files with 4 additions and 4 deletions
|
|
@ -707,7 +707,7 @@ impl<T, const N: usize> [T; N] {
|
|||
)]
|
||||
#[inline]
|
||||
pub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T]) {
|
||||
(&self[..]).split_first_chunk::<M>().unwrap()
|
||||
self.split_first_chunk::<M>().unwrap()
|
||||
}
|
||||
|
||||
/// Divides one mutable array reference into two at an index.
|
||||
|
|
@ -740,7 +740,7 @@ impl<T, const N: usize> [T; N] {
|
|||
)]
|
||||
#[inline]
|
||||
pub fn split_array_mut<const M: usize>(&mut self) -> (&mut [T; M], &mut [T]) {
|
||||
(&mut self[..]).split_first_chunk_mut::<M>().unwrap()
|
||||
self.split_first_chunk_mut::<M>().unwrap()
|
||||
}
|
||||
|
||||
/// Divides one array reference into two at an index from the end.
|
||||
|
|
@ -785,7 +785,7 @@ impl<T, const N: usize> [T; N] {
|
|||
)]
|
||||
#[inline]
|
||||
pub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M]) {
|
||||
(&self[..]).split_last_chunk::<M>().unwrap()
|
||||
self.split_last_chunk::<M>().unwrap()
|
||||
}
|
||||
|
||||
/// Divides one mutable array reference into two at an index from the end.
|
||||
|
|
@ -818,7 +818,7 @@ impl<T, const N: usize> [T; N] {
|
|||
)]
|
||||
#[inline]
|
||||
pub fn rsplit_array_mut<const M: usize>(&mut self) -> (&mut [T], &mut [T; M]) {
|
||||
(&mut self[..]).split_last_chunk_mut::<M>().unwrap()
|
||||
self.split_last_chunk_mut::<M>().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue