Skip to content

Commit

Permalink
Simplify node creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-anhuth committed Apr 14, 2023
1 parent d53a6e0 commit cb35c3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/map.rs
Expand Up @@ -1399,7 +1399,7 @@ impl<K, V> Node<K, V> {
key,
value,
});
unsafe { NodePtr::new_unchecked(Box::into_raw(boxed)) }
NodePtr::from(Box::leak(boxed))
}

unsafe fn destroy(node_ptr: NodePtr<K, V>) -> (K, V) {
Expand Down

0 comments on commit cb35c3c

Please sign in to comment.