@@ -117,12 +117,12 @@ fn test_chunks_count() {
117
117
fn test_chunks_nth ( ) {
118
118
let v: & [ i32 ] = & [ 0 , 1 , 2 , 3 , 4 , 5 ] ;
119
119
let mut c = v. chunks ( 2 ) ;
120
- assert_eq ! ( c. nth( 1 ) . unwrap( ) [ 1 ] , 3 ) ;
121
- assert_eq ! ( c. next( ) . unwrap( ) [ 0 ] , 4 ) ;
120
+ assert_eq ! ( c. nth( 1 ) . unwrap( ) , & [ 2 , 3 ] ) ;
121
+ assert_eq ! ( c. next( ) . unwrap( ) , & [ 4 , 5 ] ) ;
122
122
123
123
let v2: & [ i32 ] = & [ 0 , 1 , 2 , 3 , 4 ] ;
124
124
let mut c2 = v2. chunks ( 3 ) ;
125
- assert_eq ! ( c2. nth( 1 ) . unwrap( ) [ 1 ] , 4 ) ;
125
+ assert_eq ! ( c2. nth( 1 ) . unwrap( ) , & [ 3 , 4 ] ) ;
126
126
assert_eq ! ( c2. next( ) , None ) ;
127
127
}
128
128
@@ -168,24 +168,24 @@ fn test_chunks_mut_count() {
168
168
fn test_chunks_mut_nth ( ) {
169
169
let v: & mut [ i32 ] = & mut [ 0 , 1 , 2 , 3 , 4 , 5 ] ;
170
170
let mut c = v. chunks_mut ( 2 ) ;
171
- assert_eq ! ( c. nth( 1 ) . unwrap( ) [ 1 ] , 3 ) ;
172
- assert_eq ! ( c. next( ) . unwrap( ) [ 0 ] , 4 ) ;
171
+ assert_eq ! ( c. nth( 1 ) . unwrap( ) , & [ 2 , 3 ] ) ;
172
+ assert_eq ! ( c. next( ) . unwrap( ) , & [ 4 , 5 ] ) ;
173
173
174
174
let v2: & mut [ i32 ] = & mut [ 0 , 1 , 2 , 3 , 4 ] ;
175
175
let mut c2 = v2. chunks_mut ( 3 ) ;
176
- assert_eq ! ( c2. nth( 1 ) . unwrap( ) [ 1 ] , 4 ) ;
176
+ assert_eq ! ( c2. nth( 1 ) . unwrap( ) , & [ 3 , 4 ] ) ;
177
177
assert_eq ! ( c2. next( ) , None ) ;
178
178
}
179
179
180
180
#[ test]
181
181
fn test_chunks_mut_last ( ) {
182
182
let v: & mut [ i32 ] = & mut [ 0 , 1 , 2 , 3 , 4 , 5 ] ;
183
183
let c = v. chunks_mut ( 2 ) ;
184
- assert_eq ! ( c. last( ) . unwrap( ) [ 1 ] , 5 ) ;
184
+ assert_eq ! ( c. last( ) . unwrap( ) , & [ 4 , 5 ] ) ;
185
185
186
186
let v2: & mut [ i32 ] = & mut [ 0 , 1 , 2 , 3 , 4 ] ;
187
187
let c2 = v2. chunks_mut ( 2 ) ;
188
- assert_eq ! ( c2. last( ) . unwrap( ) [ 0 ] , 4 ) ;
188
+ assert_eq ! ( c2. last( ) . unwrap( ) , & [ 4 ] ) ;
189
189
}
190
190
191
191
#[ test]
0 commit comments