⎇ 4e1c35c5d40729fdaafc40afeea863aa12ed1d5a
benches/generated/rounding_fractial_input_2.rs
Ñawpa willay
Pi imata llamkarqan
ch'uya
1pub fn compute() {
2 #[allow(unused_imports)]
3 use taffy::prelude::*;
4 let mut taffy = taffy::Taffy::new();
5 let node0 = taffy
6 .new_leaf(taffy::style::Style {
7 flex_grow: 1f32,
8 flex_basis: taffy::style::Dimension::Points(50f32),
9 size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Points(20f32) },
10 ..Default::default()
11 })
12 .unwrap();
13 let node1 = taffy
14 .new_leaf(taffy::style::Style {
15 flex_grow: 1f32,
16 size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Points(10f32) },
17 ..Default::default()
18 })
19 .unwrap();
20 let node2 = taffy
21 .new_leaf(taffy::style::Style {
22 flex_grow: 1f32,
23 size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Points(10f32) },
24 ..Default::default()
25 })
26 .unwrap();
27 let node = taffy
28 .new_with_children(
29 taffy::style::Style {
30 flex_direction: taffy::style::FlexDirection::Column,
31 size: taffy::geometry::Size {
32 width: taffy::style::Dimension::Points(100f32),
33 height: taffy::style::Dimension::Points(113.6f32),
34 },
35 ..Default::default()
36 },
37 &[node0, node1, node2],
38 )
39 .unwrap();
40 taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
41}