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(), };