⎇ 0.1.x
benches/generated/align_items_center_with_child_top.rs
Ñawpa willay
Pi imata llamkarqan
ch'uya
1pub fn compute() {
2 let mut taffy = taffy::Taffy::new();
3 let node0 = taffy
4 .new_node(
5 taffy::style::Style {
6 size: taffy::geometry::Size {
7 width: taffy::style::Dimension::Points(10f32),
8 height: taffy::style::Dimension::Points(10f32),
9 ..Default::default()
10 },
11 position: taffy::geometry::Rect { top: taffy::style::Dimension::Points(10f32), ..Default::default() },
12 ..Default::default()
13 },
14 &[],
15 )
16 .unwrap();
17 let node = taffy
18 .new_node(
19 taffy::style::Style {
20 align_items: taffy::style::AlignItems::Center,
21 size: taffy::geometry::Size {
22 width: taffy::style::Dimension::Points(100f32),
23 height: taffy::style::Dimension::Points(100f32),
24 ..Default::default()
25 },
26 ..Default::default()
27 },
28 &[node0],
29 )
30 .unwrap();
31 taffy.compute_layout(node, taffy::geometry::Size::undefined()).unwrap();
32}