wip: bottom up dropping

This commit is contained in:
Jonathan Kelley committed 2021-08-05 22:23:41 -04:00
1 parent 687cda1b6d
commit f2334c17be
21 files changed
+682 -679

No files matched your search

+17 -17
View File
@@ -8,24 +8,24 @@ pub fn empty_cell() -> Cell<Option<ElementId>> {
Cell::new(None)
}
/// A helper type that lets scopes be ordered by their height
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct HeightMarker {
pub idx: ScopeId,
pub height: u32,
}
// /// A helper type that lets scopes be ordered by their height
// #[derive(Debug, Clone, Copy, PartialEq, Eq)]
// pub struct HeightMarker {
// pub idx: ScopeId,
// pub height: u32,
// }
impl Ord for HeightMarker {
fn cmp(&self, other: &Self) -> std::cmp::Ordering {
self.height.cmp(&other.height)
}
}
// impl Ord for HeightMarker {
// fn cmp(&self, other: &Self) -> std::cmp::Ordering {
// self.height.cmp(&other.height)
// }
// }
impl PartialOrd for HeightMarker {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
Some(self.cmp(other))
}
}
// impl PartialOrd for HeightMarker {
// fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
// Some(self.cmp(other))
// }
// }
pub struct DebugDom {}
impl DebugDom {
@@ -34,7 +34,7 @@ impl DebugDom {
}
}
impl<'a> RealDom<'a> for DebugDom {
impl RealDom for DebugDom {
fn raw_node_as_any(&self) -> &mut dyn std::any::Any {
todo!()
}