feat: omg what a dumb mistake

This commit is contained in:
Jonathan Kelley committed 2021-07-27 00:27:07 -04:00
1 parent 4a0068f099
commit f782e14211
15 files changed
+262 -131

No files matched your search

+9 -1
View File
@@ -12,7 +12,7 @@ pub struct ActiveFrame {
pub struct BumpFrame {
pub bump: Bump,
pub head_node: VNode<'static>,
pub(crate) head_node: VNode<'static>,
// used internally for debugging
name: &'static str,
@@ -36,6 +36,14 @@ impl ActiveFrame {
}
}
pub unsafe fn reset_wip_frame(&mut self) {
self.wip_frame_mut().bump.reset()
}
pub fn update_head_node<'a>(&mut self, node: VNode<'a>) {
self.wip_frame_mut().head_node = unsafe { std::mem::transmute(node) };
}
/// The "work in progress frame" represents the frame that is currently being worked on.
pub fn wip_frame(&self) -> &BumpFrame {
match self.generation.get() & 1 == 0 {