From e6857f810e8868d95ebe78753568016b6dea12ca Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 8 Dec 2022 18:44:31 +0100 Subject: Copyable regions --- library/src/visualize/shape.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'library/src/visualize/shape.rs') diff --git a/library/src/visualize/shape.rs b/library/src/visualize/shape.rs index acb5a9e9..4517380a 100644 --- a/library/src/visualize/shape.rs +++ b/library/src/visualize/shape.rs @@ -76,7 +76,7 @@ impl Layout for ShapeNode { &self, vt: &mut Vt, styles: StyleChain, - regions: &Regions, + regions: Regions, ) -> SourceResult { let mut frame; if let Some(child) = &self.0 { @@ -89,7 +89,7 @@ impl Layout for ShapeNode { let child = child.clone().padded(inset.map(|side| side.map(Length::from))); let mut pod = Regions::one(regions.first, regions.base, regions.expand); - frame = child.layout(vt, styles, &pod)?.into_frame(); + frame = child.layout(vt, styles, pod)?.into_frame(); // Relayout with full expansion into square region to make sure // the result is really a square or circle. @@ -105,7 +105,7 @@ impl Layout for ShapeNode { pod.first = Size::splat(length); pod.expand = Axes::splat(true); - frame = child.layout(vt, styles, &pod)?.into_frame(); + frame = child.layout(vt, styles, pod)?.into_frame(); } } else { // The default size that a shape takes on if it has no child and -- cgit v1.2.3