⎇ 9e53f03adea2b770d68954e404d2fa407dfc7d40
benches/generated/align_flex_start_with_stretching_children.rs
History
Who touched what
raw
Layout algorithm decoupling, Sizing Constraints & Perf Improvements (#246)
1pub fn compute() {
2 let mut taffy = taffy::Taffy::new();
3 let node000 = taffy
4 .new_with_children(
5 taffy::style::FlexboxLayout { flex_grow: 1f32, flex_shrink: 1f32, ..Default::default() },
6 &[],
7 )
8 .unwrap();
9 let node00 = taffy
10 .new_with_children(
11 taffy::style::FlexboxLayout { flex_grow: 1f32, flex_shrink: 1f32, ..Default::default() },
12 &[node000],
13 )
14 .unwrap();
15 let node0 = taffy.new_with_children(taffy::style::FlexboxLayout { ..Default::default() }, &[node00]).unwrap();
16 let node = taffy
17 .new_with_children(
18 taffy::style::FlexboxLayout {
19 size: taffy::geometry::Size {
20 width: taffy::style::Dimension::Points(500f32),
21 height: taffy::style::Dimension::Points(500f32),
22 ..Default::default()
23 },
24 ..Default::default()
25 },
26 &[node0],
27 )
28 .unwrap();
29 taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
30}