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