From bf5edbbbbb75120d065d1c9587ccfa4eed4fdca1 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 25 Nov 2022 10:36:31 +0100 Subject: Tidy up --- library/src/layout/align.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'library/src/layout/align.rs') diff --git a/library/src/layout/align.rs b/library/src/layout/align.rs index 6337c941..10a4a2ed 100644 --- a/library/src/layout/align.rs +++ b/library/src/layout/align.rs @@ -30,21 +30,21 @@ impl LayoutBlock for AlignNode { fn layout_block( &self, world: Tracked, - regions: &Regions, styles: StyleChain, + regions: &Regions, ) -> SourceResult> { // The child only needs to expand along an axis if there's no alignment. let mut pod = regions.clone(); pod.expand &= self.aligns.as_ref().map(Option::is_none); // Align paragraphs inside the child. - let mut passed = StyleMap::new(); + let mut map = StyleMap::new(); if let Some(align) = self.aligns.x { - passed.set(ParNode::ALIGN, HorizontalAlign(align)); + map.set(ParNode::ALIGN, HorizontalAlign(align)); } // Layout the child. - let mut frames = self.child.layout_block(world, &pod, passed.chain(&styles))?; + let mut frames = self.child.layout_block(world, styles.chain(&map), &pod)?; for (region, frame) in regions.iter().zip(&mut frames) { // Align in the target size. The target size depends on whether we // should expand. -- cgit v1.2.3