From 6f9d8f7ee2d7ad2b9bf8cfd9d721567bf4ccfcf8 Mon Sep 17 00:00:00 2001 From: Adam Nemecek Date: Sat, 16 May 2020 13:20:38 -0700 Subject: [PATCH] minor refactoring --- bindings/swift/StretchCore/src/lib.rs | 2 +- src/algo.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/swift/StretchCore/src/lib.rs b/bindings/swift/StretchCore/src/lib.rs index 4b6811df..2ecbc423 100644 --- a/bindings/swift/StretchCore/src/lib.rs +++ b/bindings/swift/StretchCore/src/lib.rs @@ -247,7 +247,7 @@ pub unsafe extern "C" fn stretch_node_set_measure( *node, Some(stretch::node::MeasureFunc::Boxed(Box::new(move |constraint| { let size = measure(swift_ptr, constraint.width.or_else(f32::NAN), constraint.height.or_else(f32::NAN)); - Size { width: size.width, height: size.height } + size }))), ) .unwrap(); diff --git a/src/algo.rs b/src/algo.rs index e9eed03d..d6830891 100644 --- a/src/algo.rs +++ b/src/algo.rs @@ -90,7 +90,7 @@ impl Forest { self.nodes[root].layout = result::Layout { order: 0, - size: Size { width: result.size.width, height: result.size.height }, + size: result.size, location: Point::zero(), };