gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 227Rust 7TOML 3CSS 1307 Definitions

cargo fmt

2ac1f0ebcedcc4ad09a92eb15c37ff0bc2024ed0 · by Emil Sjölander · (7 years ago) · parent 9cecd753c · browse the tree at this commit

Semantic delta

No definition changed: this change is text, documentation or data.

2 files · +3 −9

diff --git a/src/algo.rs b/src/algo.rs
index 64872b51b..cef43ba1b 100644
--- a/src/algo.rs
+++ b/src/algo.rs
@@ -512,7 +512,7 @@ fn compute_internal(
                 // TODO - not really spec abiding but needs to be done somewhere. probably somewhere else though.
                 // The following logic was developed not from the spec but by trail and error looking into how
                 // webkit handled various scenarios. Can probably be solved better by passing in
-                // min-content max-content constraints fromt the top. Need to figure out correct thing to do here as 
+                // min-content max-content constraints fromt the top. Need to figure out correct thing to do here as
                 // just piling on more conditionals.
                 let min_main = if is_row && child.node.measure.is_none() {
                     compute_internal(
diff --git a/tests/measure.rs b/tests/measure.rs
index fd33e9291..5de2ca0a8 100644
--- a/tests/measure.rs
+++ b/tests/measure.rs
@@ -143,10 +143,7 @@ mod measure {
     #[test]
     fn remeasure_child_after_growing() {
         let layout = stretch::compute(&stretch::style::Node {
-            size: stretch::geometry::Size {
-                width: stretch::style::Dimension::Points(100.0), 
-                ..Default::default()
-            },
+            size: stretch::geometry::Size { width: stretch::style::Dimension::Points(100.0), ..Default::default() },
             align_items: stretch::style::AlignItems::FlexStart,
             children: vec![
                 stretch::style::Node {
@@ -176,10 +173,7 @@ mod measure {
     #[test]
     fn remeasure_child_after_shrinking() {
         let layout = stretch::compute(&stretch::style::Node {
-            size: stretch::geometry::Size {
-                width: stretch::style::Dimension::Points(100.0), 
-                ..Default::default()
-            },
+            size: stretch::geometry::Size { width: stretch::style::Dimension::Points(100.0), ..Default::default() },
             align_items: stretch::style::AlignItems::FlexStart,
             children: vec![
                 stretch::style::Node {