⎇ b91874d4e34ecc9054b468a338ffcae6f61a1b4a
benches/generated/display_none_fixed_size.rs
Historia
Quién tocó qué
crudo
1pub fn compute() {
2 #[allow(unused_imports)]
3 use taffy::prelude::*;
4 let mut taffy = taffy::Taffy::new();
5 let node0 = taffy.new_leaf(taffy::style::Style { flex_grow: 1f32, ..Default::default() }).unwrap();
6 let node1 = taffy
7 .new_leaf(taffy::style::Style {
8 display: taffy::style::Display::None,
9 size: taffy::geometry::Size {
10 width: taffy::style::Dimension::Points(20f32),
11 height: taffy::style::Dimension::Points(20f32),
12 },
13 ..Default::default()
14 })
15 .unwrap();
16 let node = taffy
17 .new_with_children(
18 taffy::style::Style {
19 size: taffy::geometry::Size {
20 width: taffy::style::Dimension::Points(100f32),
21 height: taffy::style::Dimension::Points(100f32),
22 },
23 ..Default::default()
24 },
25 &[node0, node1],
26 )
27 .unwrap();
28 taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
29}