mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-25 01:01:34 +11:00
Encaspulate a bit better
This commit is contained in:
parent
9bfb8de481
commit
ab80f200e8
|
@ -439,7 +439,7 @@ impl<K, V> Node<K, V> {
|
||||||
|
|
||||||
impl<K, V> Drop for Node<K, V> {
|
impl<K, V> Drop for Node<K, V> {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
if self.distance_to_initial_bucket >= 0 {
|
if self.has_value() {
|
||||||
unsafe { ptr::drop_in_place(self.key.as_mut_ptr()) };
|
unsafe { ptr::drop_in_place(self.key.as_mut_ptr()) };
|
||||||
unsafe { ptr::drop_in_place(self.value.as_mut_ptr()) };
|
unsafe { ptr::drop_in_place(self.value.as_mut_ptr()) };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue