@@ -680,7 +680,7 @@ impl<T> [T] {
680
680
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
681
681
#[ inline]
682
682
pub fn windows ( & self , size : usize ) -> Windows < ' _ , T > {
683
- assert ! ( size != 0 ) ;
683
+ assert_ne ! ( size, 0 ) ;
684
684
Windows { v : self , size }
685
685
}
686
686
@@ -714,7 +714,7 @@ impl<T> [T] {
714
714
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
715
715
#[ inline]
716
716
pub fn chunks ( & self , chunk_size : usize ) -> Chunks < ' _ , T > {
717
- assert ! ( chunk_size != 0 ) ;
717
+ assert_ne ! ( chunk_size, 0 ) ;
718
718
Chunks { v : self , chunk_size }
719
719
}
720
720
@@ -752,7 +752,7 @@ impl<T> [T] {
752
752
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
753
753
#[ inline]
754
754
pub fn chunks_mut ( & mut self , chunk_size : usize ) -> ChunksMut < ' _ , T > {
755
- assert ! ( chunk_size != 0 ) ;
755
+ assert_ne ! ( chunk_size, 0 ) ;
756
756
ChunksMut { v : self , chunk_size }
757
757
}
758
758
@@ -789,7 +789,7 @@ impl<T> [T] {
789
789
#[ stable( feature = "chunks_exact" , since = "1.31.0" ) ]
790
790
#[ inline]
791
791
pub fn chunks_exact ( & self , chunk_size : usize ) -> ChunksExact < ' _ , T > {
792
- assert ! ( chunk_size != 0 ) ;
792
+ assert_ne ! ( chunk_size, 0 ) ;
793
793
let rem = self . len ( ) % chunk_size;
794
794
let len = self . len ( ) - rem;
795
795
let ( fst, snd) = self . split_at ( len) ;
@@ -834,7 +834,7 @@ impl<T> [T] {
834
834
#[ stable( feature = "chunks_exact" , since = "1.31.0" ) ]
835
835
#[ inline]
836
836
pub fn chunks_exact_mut ( & mut self , chunk_size : usize ) -> ChunksExactMut < ' _ , T > {
837
- assert ! ( chunk_size != 0 ) ;
837
+ assert_ne ! ( chunk_size, 0 ) ;
838
838
let rem = self . len ( ) % chunk_size;
839
839
let len = self . len ( ) - rem;
840
840
let ( fst, snd) = self . split_at_mut ( len) ;
0 commit comments