Skip to content

Commit

Permalink
hashtable: fix clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
neutr0nst4r committed Sep 14, 2023
1 parent a32684e commit 03090e2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/internal/hash_table/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,7 @@ impl<K: Eq, V, A: Allocator, H: Hash<K>, E: Equals<K>> HashTable<K, V, A, H, E>
// allocate a new node and add it to the bucket
let node = self.allocator.allocate::<Node<K, V>>(1);
unsafe {
std::ptr::write(
node as *mut Node<K, V>,
Node::<K, V>::new(key, value, target_bucket.read()),
);
std::ptr::write(node, Node::<K, V>::new(key, value, target_bucket.read()));
target_bucket.write(node);
};
self.element_count += 1;
Expand Down

0 comments on commit 03090e2

Please sign in to comment.