fix Dirty Nodes for large NodeIds

This commit is contained in:
Evan Almloff committed 2023-03-24 13:41:00 -05:00
1 parent 6bc9bc6ef9
commit e4cb8c3aa0
2 files changed
+9 -26

No files matched your search

+2 -2
View File
@@ -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 {