Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Jul 22, 2023
1 parent 289ce23 commit 954e4dc
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions tests/relayout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,30 +333,34 @@ fn relayout_is_stable_with_rounding() {
// </div>
// </div>

let inner = taffy.new_leaf(Style { min_size: Size { width: length(300.), height: auto() }, ..Default::default() }).unwrap();
let wrapper = taffy.new_with_children(
Style {
size: Size { width: length(150.), height: auto() },
justify_content: Some(JustifyContent::End),
..Default::default()
},
&[inner]
).unwrap();
let outer = taffy.new_with_children(
Style {
size: Size { width: percent(1.), height: auto() },
inset: Rect { left: length(1.5), right: auto(), top: auto(), bottom: auto() },
..Default::default()
},
&[wrapper]
).unwrap();
let root = taffy.new_with_children(
Style {
size: Size { width: length(1920.),height: length(1080.) },
..Default::default()
},
&[outer]
).unwrap();
let inner =
taffy.new_leaf(Style { min_size: Size { width: length(300.), height: auto() }, ..Default::default() }).unwrap();
let wrapper = taffy
.new_with_children(
Style {
size: Size { width: length(150.), height: auto() },
justify_content: Some(JustifyContent::End),
..Default::default()
},
&[inner],
)
.unwrap();
let outer = taffy
.new_with_children(
Style {
size: Size { width: percent(1.), height: auto() },
inset: Rect { left: length(1.5), right: auto(), top: auto(), bottom: auto() },
..Default::default()
},
&[wrapper],
)
.unwrap();
let root = taffy
.new_with_children(
Style { size: Size { width: length(1920.), height: length(1080.) }, ..Default::default() },
&[outer],
)
.unwrap();
for _ in 0..5 {
taffy.mark_dirty(root).ok();
taffy.compute_layout(root, Size::MAX_CONTENT).ok();
Expand Down

0 comments on commit 954e4dc

Please sign in to comment.