fix Dirty Nodes for large NodeIds
This commit is contained in:
1 parent
6bc9bc6ef9
commit
e4cb8c3aa0
2 files changed
+9
-26
No files matched your search
@@ -49,7 +49,7 @@ pub trait TreeMut: TreeRef {
|
||||
|
||||
impl<'a> TreeRef for TreeRefView<'a> {
|
||||
fn parent_id(&self, id: NodeId) -> Option<NodeId> {
|
||||
self.get(id).unwrap().parent
|
||||
self.get(id).ok()?.parent
|
||||
}
|
||||
|
||||
fn children_ids(&self, id: NodeId) -> Vec<NodeId> {
|
||||
@@ -59,7 +59,7 @@ impl<'a> TreeRef for TreeRefView<'a> {
|
||||
}
|
||||
|
||||
fn height(&self, id: NodeId) -> Option<u16> {
|
||||
Some(self.get(id).unwrap().height)
|
||||
Some(self.get(id).ok()?.height)
|
||||
}
|
||||
|
||||
fn contains(&self, id: NodeId) -> bool {
|
||||
|
||||
Reference in new issue
Block a user