fn insert_hashed_ordered(&mut self, hash: SafeHash, k: K, v: V) {
        let mut buckets = Bucket::new(&mut self.table, hash);
        let start_index = buckets.index();

        loop {
            // We don't need to compare hashes for value swap.
            // Not even DIBs for Robin Hood.
            buckets = match buckets.peek() {
                Empty(empty) => {
                    empty.put(hash, k, v);
                    return;
                }
                Full(b) => b.into_bucket(),
            };
            buckets.next();
            debug_assert!(buckets.index() != start_index);
        }
    }
// The caller should ensure that invariants by Robin Hood Hashing hold
// and that there's space in the underlying table.
The caller should ensure that invariants by Robin Hood Hashing hold
and that there's space in the underlying table.
The caller should ensure that invariants by Robin Hood Hashing hold and that there ' s space in the underlying table .
fn insert_hashed_ordered(&mut self, hash: SafeHash, k: K, v: V) {
        let mut buckets = Bucket::new(&mut self.table, hash);
        let start_index = buckets.index();
        loop {
            // We don't need to compare hashes for value swap.
            // Not even DIBs for Robin Hood.
            buckets = match buckets.peek() {
                Empty(empty) => {
                    empty.put(hash, k, v);
                    return;
                }
                Full(b) => b.into_bucket(),
            };
            buckets.next();
            debug_assert!(buckets.index() != start_index);
        }
    }
fn insert_hashed_ordered ( & mut self , hash : SafeHash , k : K , v : V ) { let mut buckets = Bucket :: new ( & mut self . table , hash ) ; let start_index = buckets . index ( ) ; loop { // We don't need to compare hashes for value swap. // Not even DIBs for Robin Hood. buckets = match buckets . peek ( ) { Empty ( empty ) => { empty . put ( hash , k , v ) ; return ; } Full ( b ) => b . into_bucket ( ) , } ; buckets . next ( ) ; debug_assert ! ( buckets index ( ) start_index ) ; } }
The caller should ensure that invariants by Robin Hood Hashing hold
and that there's space in the underlying table.
The caller should ensure that invariants by Robin Hood Hashing hold and that there ' s space in the underlying table .
&mut self
hash
SafeHash
k
K
v
V