⎇ edd994fd39750e366114cf4d5a66f7092a97edfa
benches/generated/flex_root_ignored.rs
Ñawpa willay
Pi imata llamkarqan
ch'uya
1pub fn compute() {
2 let mut stretch = stretch::Stretch::new();
3 let node0 = stretch
4 .new_node(
5 stretch::style::Style {
6 flex_grow: 1f32,
7 flex_basis: stretch::style::Dimension::Points(200f32),
8 ..Default::default()
9 },
10 vec![],
11 )
12 .unwrap();
13 let node1 = stretch
14 .new_node(
15 stretch::style::Style {
16 size: stretch::geometry::Size {
17 height: stretch::style::Dimension::Points(100f32),
18 ..Default::default()
19 },
20 ..Default::default()
21 },
22 vec![],
23 )
24 .unwrap();
25 let node = stretch
26 .new_node(
27 stretch::style::Style {
28 flex_direction: stretch::style::FlexDirection::Column,
29 size: stretch::geometry::Size {
30 width: stretch::style::Dimension::Points(100f32),
31 ..Default::default()
32 },
33 min_size: stretch::geometry::Size {
34 height: stretch::style::Dimension::Points(100f32),
35 ..Default::default()
36 },
37 max_size: stretch::geometry::Size {
38 height: stretch::style::Dimension::Points(500f32),
39 ..Default::default()
40 },
41 ..Default::default()
42 },
43 vec![node0, node1],
44 )
45 .unwrap();
46 stretch.compute_layout(node, stretch::geometry::Size::undefined()).unwrap();
47}