tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 1100HTML 1031Markdown 12TOML 84455 Definiciones

minor refactoring

6f9d8f7ee2d7ad2b9bf8cfd9d721567bf4ccfcf8 · por Adam Nemecek · (hace 6 años) · padre 4f9810296 · ver el árbol en este commit

Delta semántico · 2

bindings/swift/StretchCore/src/lib.rs

src/algo.rs

2 archivos · +2 −2

diff --git a/bindings/swift/StretchCore/src/lib.rs b/bindings/swift/StretchCore/src/lib.rs
index 4b6811df2..2ecbc4238 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 e9eed03d1..d68308918 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(),
         };