Respect the comment: no root unless the borrow type is `Mut`
This commit is contained in:
parent
607315b2c3
commit
de39a4f621
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue