From 6b6cdae7ce95681d6a1194be70b375494166a8c6 Mon Sep 17 00:00:00 2001 From: Martin Haug Date: Sun, 27 Jun 2021 12:28:40 +0200 Subject: Testing for incremental Also, constraint bugfixes. --- src/layout/mod.rs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/layout/mod.rs') diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 10c30f41..dc819a16 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -102,18 +102,10 @@ impl Layout for AnyNode { regions: &Regions, ) -> Vec>> { ctx.level += 1; - let frames = ctx - .cache - .layout - .frames - .get(&self.hash) - .and_then(|x| x.check(regions.clone())) - .unwrap_or_else(|| { + let frames = + ctx.cache.layout.get(self.hash, regions.clone()).unwrap_or_else(|| { let frames = self.node.layout(ctx, regions); - ctx.cache.layout.frames.insert(self.hash, FramesEntry { - frames: frames.clone(), - level: ctx.level - 1, - }); + ctx.cache.layout.insert(self.hash, frames.clone(), ctx.level - 1); frames }); ctx.level -= 1; -- cgit v1.2.3