@@ -282,18 +282,18 @@ impl<K, V> IndexMapCore<K, V> {
282
282
if shifted_entries. len ( ) > raw_capacity / 2 {
283
283
// shift all indices greater than `index`
284
284
unsafe {
285
- for raw_bucket in self . indices . iter ( ) {
286
- let i = raw_bucket . read ( ) ;
285
+ for bucket in self . indices . iter ( ) {
286
+ let i = bucket . read ( ) ;
287
287
if i > index {
288
- raw_bucket . write ( i - 1 ) ;
288
+ bucket . write ( i - 1 ) ;
289
289
}
290
290
}
291
291
}
292
292
} else {
293
293
// find each following entry to shift its index
294
294
for ( i, entry) in ( index + 1 ..) . zip ( shifted_entries) {
295
- let raw_bucket = self . find_index ( entry. hash , i) . unwrap ( ) ;
296
- unsafe { raw_bucket . write ( i - 1 ) } ;
295
+ let shifted_bucket = self . find_index ( entry. hash , i) . unwrap ( ) ;
296
+ unsafe { shifted_bucket . write ( i - 1 ) } ;
297
297
}
298
298
}
299
299
@@ -336,8 +336,8 @@ impl<K, V> IndexMapCore<K, V> {
336
336
// was not last element
337
337
// examine new element in `index` and find it in indices
338
338
let last = self . entries . len ( ) ;
339
- let raw_bucket = self . find_index ( entry. hash , last) . unwrap ( ) ;
340
- unsafe { raw_bucket . write ( index) } ;
339
+ let swapped_bucket = self . find_index ( entry. hash , last) . unwrap ( ) ;
340
+ unsafe { swapped_bucket . write ( index) } ;
341
341
}
342
342
343
343
( index, entry. key , entry. value )
0 commit comments