@@ -1178,7 +1178,7 @@ impl<'a, T> Iterator for Windows<'a, T> {
1178
1178
}
1179
1179
1180
1180
#[ doc( hidden) ]
1181
- unsafe fn get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
1181
+ unsafe fn __iterator_get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
1182
1182
// SAFETY: since the caller guarantees that `i` is in bounds,
1183
1183
// which means that `i` cannot overflow an `isize`, and the
1184
1184
// slice created by `from_raw_parts` is a subslice of `self.v`
@@ -1324,7 +1324,7 @@ impl<'a, T> Iterator for Chunks<'a, T> {
1324
1324
}
1325
1325
1326
1326
#[ doc( hidden) ]
1327
- unsafe fn get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
1327
+ unsafe fn __iterator_get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
1328
1328
let start = idx * self . chunk_size ;
1329
1329
let end = match start. checked_add ( self . chunk_size ) {
1330
1330
None => self . v . len ( ) ,
@@ -1480,13 +1480,13 @@ impl<'a, T> Iterator for ChunksMut<'a, T> {
1480
1480
}
1481
1481
1482
1482
#[ doc( hidden) ]
1483
- unsafe fn get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
1483
+ unsafe fn __iterator_get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
1484
1484
let start = idx * self . chunk_size ;
1485
1485
let end = match start. checked_add ( self . chunk_size ) {
1486
1486
None => self . v . len ( ) ,
1487
1487
Some ( end) => cmp:: min ( end, self . v . len ( ) ) ,
1488
1488
} ;
1489
- // SAFETY: see comments for `Chunks::get_unchecked `.
1489
+ // SAFETY: see comments for `Chunks::__iterator_get_unchecked `.
1490
1490
//
1491
1491
// Also note that the caller also guarantees that we're never called
1492
1492
// with the same index again, and that no other methods that will
@@ -1642,9 +1642,9 @@ impl<'a, T> Iterator for ChunksExact<'a, T> {
1642
1642
}
1643
1643
1644
1644
#[ doc( hidden) ]
1645
- unsafe fn get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
1645
+ unsafe fn __iterator_get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
1646
1646
let start = idx * self . chunk_size ;
1647
- // SAFETY: mostly identical to `Chunks::get_unchecked `.
1647
+ // SAFETY: mostly identical to `Chunks::__iterator_get_unchecked `.
1648
1648
unsafe { from_raw_parts ( self . v . as_ptr ( ) . add ( start) , self . chunk_size ) }
1649
1649
}
1650
1650
}
@@ -1785,9 +1785,9 @@ impl<'a, T> Iterator for ChunksExactMut<'a, T> {
1785
1785
}
1786
1786
1787
1787
#[ doc( hidden) ]
1788
- unsafe fn get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
1788
+ unsafe fn __iterator_get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
1789
1789
let start = idx * self . chunk_size ;
1790
- // SAFETY: see comments for `ChunksMut::get_unchecked `.
1790
+ // SAFETY: see comments for `ChunksMut::__iterator_get_unchecked `.
1791
1791
unsafe { from_raw_parts_mut ( self . v . as_mut_ptr ( ) . add ( start) , self . chunk_size ) }
1792
1792
}
1793
1793
}
@@ -2030,10 +2030,10 @@ impl<'a, T, const N: usize> Iterator for ArrayChunks<'a, T, N> {
2030
2030
self . iter . last ( )
2031
2031
}
2032
2032
2033
- unsafe fn get_unchecked ( & mut self , i : usize ) -> & ' a [ T ; N ] {
2034
- // SAFETY: The safety guarantees of `get_unchecked ` are transferred to
2035
- // the caller.
2036
- unsafe { self . iter . get_unchecked ( i) }
2033
+ unsafe fn __iterator_get_unchecked ( & mut self , i : usize ) -> & ' a [ T ; N ] {
2034
+ // SAFETY: The safety guarantees of `__iterator_get_unchecked ` are
2035
+ // transferred to the caller.
2036
+ unsafe { self . iter . __iterator_get_unchecked ( i) }
2037
2037
}
2038
2038
}
2039
2039
@@ -2141,10 +2141,10 @@ impl<'a, T, const N: usize> Iterator for ArrayChunksMut<'a, T, N> {
2141
2141
self . iter . last ( )
2142
2142
}
2143
2143
2144
- unsafe fn get_unchecked ( & mut self , i : usize ) -> & ' a mut [ T ; N ] {
2145
- // SAFETY: The safety guarantees of `get_unchecked ` are transferred to
2144
+ unsafe fn __iterator_get_unchecked ( & mut self , i : usize ) -> & ' a mut [ T ; N ] {
2145
+ // SAFETY: The safety guarantees of `__iterator_get_unchecked ` are transferred to
2146
2146
// the caller.
2147
- unsafe { self . iter . get_unchecked ( i) }
2147
+ unsafe { self . iter . __iterator_get_unchecked ( i) }
2148
2148
}
2149
2149
}
2150
2150
@@ -2278,13 +2278,13 @@ impl<'a, T> Iterator for RChunks<'a, T> {
2278
2278
}
2279
2279
2280
2280
#[ doc( hidden) ]
2281
- unsafe fn get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
2281
+ unsafe fn __iterator_get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
2282
2282
let end = self . v . len ( ) - idx * self . chunk_size ;
2283
2283
let start = match end. checked_sub ( self . chunk_size ) {
2284
2284
None => 0 ,
2285
2285
Some ( start) => start,
2286
2286
} ;
2287
- // SAFETY: mostly identical to `Chunks::get_unchecked `.
2287
+ // SAFETY: mostly identical to `Chunks::__iterator_get_unchecked `.
2288
2288
unsafe { from_raw_parts ( self . v . as_ptr ( ) . add ( start) , end - start) }
2289
2289
}
2290
2290
}
@@ -2431,13 +2431,14 @@ impl<'a, T> Iterator for RChunksMut<'a, T> {
2431
2431
}
2432
2432
2433
2433
#[ doc( hidden) ]
2434
- unsafe fn get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
2434
+ unsafe fn __iterator_get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
2435
2435
let end = self . v . len ( ) - idx * self . chunk_size ;
2436
2436
let start = match end. checked_sub ( self . chunk_size ) {
2437
2437
None => 0 ,
2438
2438
Some ( start) => start,
2439
2439
} ;
2440
- // SAFETY: see comments for `RChunks::get_unchecked` and `ChunksMut::get_unchecked`
2440
+ // SAFETY: see comments for `RChunks::__iterator_get_unchecked` and
2441
+ // `ChunksMut::__iterator_get_unchecked`
2441
2442
unsafe { from_raw_parts_mut ( self . v . as_mut_ptr ( ) . add ( start) , end - start) }
2442
2443
}
2443
2444
}
@@ -2585,11 +2586,11 @@ impl<'a, T> Iterator for RChunksExact<'a, T> {
2585
2586
}
2586
2587
2587
2588
#[ doc( hidden) ]
2588
- unsafe fn get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
2589
+ unsafe fn __iterator_get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
2589
2590
let end = self . v . len ( ) - idx * self . chunk_size ;
2590
2591
let start = end - self . chunk_size ;
2591
2592
// SAFETY:
2592
- // SAFETY: mostmy identical to `Chunks::get_unchecked `.
2593
+ // SAFETY: mostmy identical to `Chunks::__iterator_get_unchecked `.
2593
2594
unsafe { from_raw_parts ( self . v . as_ptr ( ) . add ( start) , self . chunk_size ) }
2594
2595
}
2595
2596
}
@@ -2734,10 +2735,10 @@ impl<'a, T> Iterator for RChunksExactMut<'a, T> {
2734
2735
}
2735
2736
2736
2737
#[ doc( hidden) ]
2737
- unsafe fn get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
2738
+ unsafe fn __iterator_get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
2738
2739
let end = self . v . len ( ) - idx * self . chunk_size ;
2739
2740
let start = end - self . chunk_size ;
2740
- // SAFETY: see comments for `RChunksMut::get_unchecked `.
2741
+ // SAFETY: see comments for `RChunksMut::__iterator_get_unchecked `.
2741
2742
unsafe { from_raw_parts_mut ( self . v . as_mut_ptr ( ) . add ( start) , self . chunk_size ) }
2742
2743
}
2743
2744
}
0 commit comments