Skip to content

Commit 6f9d8f7

Browse files
committed
minor refactoring
1 parent 4f98102 commit 6f9d8f7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bindings/swift/StretchCore/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ pub unsafe extern "C" fn stretch_node_set_measure(
247247
*node,
248248
Some(stretch::node::MeasureFunc::Boxed(Box::new(move |constraint| {
249249
let size = measure(swift_ptr, constraint.width.or_else(f32::NAN), constraint.height.or_else(f32::NAN));
250-
Size { width: size.width, height: size.height }
250+
size
251251
}))),
252252
)
253253
.unwrap();

src/algo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl Forest {
9090

9191
self.nodes[root].layout = result::Layout {
9292
order: 0,
93-
size: Size { width: result.size.width, height: result.size.height },
93+
size: result.size,
9494
location: Point::zero(),
9595
};
9696

0 commit comments

Comments
 (0)