Skip to content

Commit a66cf35

Browse files
authored
Unrolled build for #143378
Rollup merge of #143378 - hkBst:clippy-fix-6, r=tgross35 simplify receivers for some array method calls
2 parents 837c5dd + d3f2e2e commit a66cf35

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/core/src/array/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ impl<T, const N: usize> [T; N] {
707707
)]
708708
#[inline]
709709
pub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T]) {
710-
(&self[..]).split_first_chunk::<M>().unwrap()
710+
self.split_first_chunk::<M>().unwrap()
711711
}
712712

713713
/// Divides one mutable array reference into two at an index.
@@ -740,7 +740,7 @@ impl<T, const N: usize> [T; N] {
740740
)]
741741
#[inline]
742742
pub fn split_array_mut<const M: usize>(&mut self) -> (&mut [T; M], &mut [T]) {
743-
(&mut self[..]).split_first_chunk_mut::<M>().unwrap()
743+
self.split_first_chunk_mut::<M>().unwrap()
744744
}
745745

746746
/// Divides one array reference into two at an index from the end.
@@ -785,7 +785,7 @@ impl<T, const N: usize> [T; N] {
785785
)]
786786
#[inline]
787787
pub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M]) {
788-
(&self[..]).split_last_chunk::<M>().unwrap()
788+
self.split_last_chunk::<M>().unwrap()
789789
}
790790

791791
/// Divides one mutable array reference into two at an index from the end.
@@ -818,7 +818,7 @@ impl<T, const N: usize> [T; N] {
818818
)]
819819
#[inline]
820820
pub fn rsplit_array_mut<const M: usize>(&mut self) -> (&mut [T], &mut [T; M]) {
821-
(&mut self[..]).split_last_chunk_mut::<M>().unwrap()
821+
self.split_last_chunk_mut::<M>().unwrap()
822822
}
823823
}
824824

0 commit comments

Comments
 (0)