diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-12-08 18:44:31 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-12-08 19:03:23 +0100 |
| commit | e6857f810e8868d95ebe78753568016b6dea12ca (patch) | |
| tree | 1b33a10470b9dff1d3c5e36ea4fd81fdf6b114cf /library/src/visualize/shape.rs | |
| parent | 11c7ceb29e762f6dd1d093d9fdb57e9612a92df0 (diff) | |
Copyable regions
Diffstat (limited to 'library/src/visualize/shape.rs')
| -rw-r--r-- | library/src/visualize/shape.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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<const S: ShapeKind> Layout for ShapeNode<S> { &self, vt: &mut Vt, styles: StyleChain, - regions: &Regions, + regions: Regions, ) -> SourceResult<Fragment> { let mut frame; if let Some(child) = &self.0 { @@ -89,7 +89,7 @@ impl<const S: ShapeKind> Layout for ShapeNode<S> { 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<const S: ShapeKind> Layout for ShapeNode<S> { 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 |
