⎇ a380b58cb0418ea3728af9a67d188410c6c10f7a
benches/generated/flex_basis_unconstraint_column.rs
Historia
Quién tocó qué
crudo
Update all benchmarks to use the new API
1pub fn compute() {
2 let mut stretch = stretch::Stretch::new();
3 let node0 = stretch
4 .new_node(
5 stretch::style::Style {
6 flex_basis: stretch::style::Dimension::Points(50f32),
7 size: stretch::geometry::Size {
8 width: stretch::style::Dimension::Points(100f32),
9 ..Default::default()
10 },
11 ..Default::default()
12 },
13 &[],
14 )
15 .unwrap();
16 let node = stretch
17 .new_node(
18 stretch::style::Style { flex_direction: stretch::style::FlexDirection::Column, ..Default::default() },
19 &[node0],
20 )
21 .unwrap();
22 stretch.compute_layout(node, stretch::geometry::Size::undefined()).unwrap();
23}