summaryrefslogtreecommitdiff
path: root/src/layout/incremental.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout/incremental.rs')
-rw-r--r--src/layout/incremental.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/layout/incremental.rs b/src/layout/incremental.rs
index 7857f33c..a5c3cea3 100644
--- a/src/layout/incremental.rs
+++ b/src/layout/incremental.rs
@@ -26,7 +26,7 @@ impl LayoutCache {
where
F: FnMut(usize) -> bool,
{
- self.frames.retain(|_, b| f(b.level));
+ self.frames.retain(|_, entry| f(entry.level));
}
/// Amount of items in the cache.
@@ -39,14 +39,14 @@ impl LayoutCache {
/// Cached frames from past layouting.
pub struct FramesEntry {
/// The cached frames for a node.
- pub frames: Vec<Constrained<Frame>>,
+ pub frames: Vec<Constrained<Rc<Frame>>>,
/// How nested the frame was in the context is was originally appearing in.
pub level: usize,
}
impl FramesEntry {
/// Checks if the cached [`Frame`] is valid for the given regions.
- pub fn check(&self, mut regions: Regions) -> Option<Vec<Constrained<Frame>>> {
+ pub fn check(&self, mut regions: Regions) -> Option<Vec<Constrained<Rc<Frame>>>> {
for (i, frame) in self.frames.iter().enumerate() {
if (i != 0 && !regions.next()) || !frame.constraints.check(&regions) {
return None;