⎇ 9f42ca4a0d99e501f16c3148bd1caf12b37b2ac5
benches/generated/margin_right.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 size: stretch::geometry::Size { width: stretch::style::Dimension::Points(10f32), ..Default::default() },
7 margin: stretch::geometry::Rect { end: stretch::style::Dimension::Points(10f32), ..Default::default() },
8 ..Default::default()
9 },
10 vec![],
11 )
12 .unwrap();
13 let node = stretch
14 .new_node(
15 stretch::style::Style {
16 justify_content: stretch::style::JustifyContent::FlexEnd,
17 size: stretch::geometry::Size {
18 width: stretch::style::Dimension::Points(100f32),
19 height: stretch::style::Dimension::Points(100f32),
20 ..Default::default()
21 },
22 ..Default::default()
23 },
24 vec![node0],
25 )
26 .unwrap();
27 stretch.compute_layout(node, stretch::geometry::Size::undefined()).unwrap();
28}