Respect the comment: no root unless the borrow type is `Mut`

This commit is contained in:
Stein Somers 2020-04-09 20:19:18 +02:00
parent 607315b2c3
commit de39a4f621
1 changed files with 2 additions and 2 deletions

View File

@ -161,7 +161,7 @@ impl<K, V> Root<K, V> {
NodeRef {
height: self.height,
node: self.node.as_ptr(),
root: self as *const _ as *mut _,
root: ptr::null(),
_marker: PhantomData,
}
}
@ -179,7 +179,7 @@ impl<K, V> Root<K, V> {
NodeRef {
height: self.height,
node: self.node.as_ptr(),
root: ptr::null_mut(), // FIXME: Is there anything better to do here?
root: ptr::null(),
_marker: PhantomData,
}
}