@@ -437,7 +437,6 @@ pub struct VacantEntry<'a, K: 'a, V: 'a, S: 'a = RandomState> {
437
437
probe : usize ,
438
438
#[ allow( dead_code) ]
439
439
index : usize ,
440
- stealing_bucket : bool ,
441
440
}
442
441
443
442
impl < ' a , K , V , S > VacantEntry < ' a , K , V , S > {
@@ -456,12 +455,8 @@ impl<'a, K, V, S> VacantEntry<'a, K, V, S> {
456
455
{
457
456
let index = self . map . entries . len ( ) ;
458
457
self . map . entries . push ( Bucket { hash : self . hash , key : self . key , value : value } ) ;
459
- if self . stealing_bucket {
460
- let old_pos = Pos :: with_hash :: < Sz > ( index, self . hash ) ;
461
- self . map . insert_phase_2 :: < Sz > ( self . probe , old_pos) ;
462
- } else {
463
- self . map . indices [ self . probe ] = Pos :: with_hash :: < Sz > ( index, self . hash ) ;
464
- }
458
+ let old_pos = Pos :: with_hash :: < Sz > ( index, self . hash ) ;
459
+ self . map . insert_phase_2 :: < Sz > ( self . probe , old_pos) ;
465
460
& mut { self . map } . entries [ index] . value
466
461
}
467
462
}
@@ -508,7 +503,6 @@ impl<K, V, S> OrderMap<K, V, S>
508
503
hash: hash,
509
504
key: key,
510
505
probe: probe,
511
- stealing_bucket: true ,
512
506
index: i,
513
507
} ) ;
514
508
} else if entry_hash == hash && self . entries[ i] . key == key {
@@ -527,7 +521,6 @@ impl<K, V, S> OrderMap<K, V, S>
527
521
hash: hash,
528
522
key: key,
529
523
probe: probe,
530
- stealing_bucket: false ,
531
524
index: 0 ,
532
525
} ) ;
533
526
}
0 commit comments