@@ -674,7 +674,7 @@ impl<T> [T] {
674
674
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
675
675
#[ inline]
676
676
pub fn windows ( & self , size : usize ) -> Windows < ' _ , T > {
677
- assert ! ( size != 0 ) ;
677
+ assert_ne ! ( size, 0 ) ;
678
678
Windows { v : self , size }
679
679
}
680
680
@@ -708,7 +708,7 @@ impl<T> [T] {
708
708
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
709
709
#[ inline]
710
710
pub fn chunks ( & self , chunk_size : usize ) -> Chunks < ' _ , T > {
711
- assert ! ( chunk_size != 0 ) ;
711
+ assert_ne ! ( chunk_size, 0 ) ;
712
712
Chunks { v : self , chunk_size }
713
713
}
714
714
@@ -746,7 +746,7 @@ impl<T> [T] {
746
746
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
747
747
#[ inline]
748
748
pub fn chunks_mut ( & mut self , chunk_size : usize ) -> ChunksMut < ' _ , T > {
749
- assert ! ( chunk_size != 0 ) ;
749
+ assert_ne ! ( chunk_size, 0 ) ;
750
750
ChunksMut { v : self , chunk_size }
751
751
}
752
752
@@ -783,7 +783,7 @@ impl<T> [T] {
783
783
#[ stable( feature = "chunks_exact" , since = "1.31.0" ) ]
784
784
#[ inline]
785
785
pub fn chunks_exact ( & self , chunk_size : usize ) -> ChunksExact < ' _ , T > {
786
- assert ! ( chunk_size != 0 ) ;
786
+ assert_ne ! ( chunk_size, 0 ) ;
787
787
let rem = self . len ( ) % chunk_size;
788
788
let len = self . len ( ) - rem;
789
789
let ( fst, snd) = self . split_at ( len) ;
@@ -828,7 +828,7 @@ impl<T> [T] {
828
828
#[ stable( feature = "chunks_exact" , since = "1.31.0" ) ]
829
829
#[ inline]
830
830
pub fn chunks_exact_mut ( & mut self , chunk_size : usize ) -> ChunksExactMut < ' _ , T > {
831
- assert ! ( chunk_size != 0 ) ;
831
+ assert_ne ! ( chunk_size, 0 ) ;
832
832
let rem = self . len ( ) % chunk_size;
833
833
let len = self . len ( ) - rem;
834
834
let ( fst, snd) = self . split_at_mut ( len) ;
0 commit comments