@@ -393,7 +393,7 @@ fn pop_internal<K, V>(starting_bucket: FullBucketMut<K, V>) -> (K, V) {
393
393
None => return ( retkey, retval)
394
394
} ;
395
395
396
- while gap. full ( ) . distance ( ) != 0 {
396
+ while gap. full ( ) . displacement ( ) != 0 {
397
397
gap = match gap. shift ( ) {
398
398
Some ( b) => b,
399
399
None => break
@@ -423,7 +423,7 @@ fn robin_hood<'a, K: 'a, V: 'a>(mut bucket: FullBucketMut<'a, K, V>,
423
423
// There can be at most `size - dib` buckets to displace, because
424
424
// in the worst case, there are `size` elements and we already are
425
425
// `distance` buckets away from the initial one.
426
- let idx_end = starting_index + size - bucket. distance ( ) ;
426
+ let idx_end = starting_index + size - bucket. displacement ( ) ;
427
427
428
428
loop {
429
429
let ( old_hash, old_key, old_val) = bucket. replace ( hash, k, v) ;
@@ -446,7 +446,7 @@ fn robin_hood<'a, K: 'a, V: 'a>(mut bucket: FullBucketMut<'a, K, V>,
446
446
Full ( bucket) => bucket
447
447
} ;
448
448
449
- let probe_ib = full_bucket. index ( ) - full_bucket. distance ( ) ;
449
+ let probe_ib = full_bucket. index ( ) - full_bucket. displacement ( ) ;
450
450
451
451
bucket = full_bucket;
452
452
@@ -731,7 +731,7 @@ impl<K, V, S> HashMap<K, V, S>
731
731
loop {
732
732
bucket = match bucket. peek ( ) {
733
733
Full ( full) => {
734
- if full. distance ( ) == 0 {
734
+ if full. displacement ( ) == 0 {
735
735
// This bucket occupies its ideal spot.
736
736
// It indicates the start of another "cluster".
737
737
bucket = full. into_bucket ( ) ;
0 commit comments