⎇ 4e1c35c5d40729fdaafc40afeea863aa12ed1d5a
benches/generated/undefined_height_with_min_max.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
6 .new_leaf(taffy::style::Style {
7 min_size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Points(0f32) },
8 max_size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Points(100f32) },
9 ..Default::default()
10 })
11 .unwrap();
12 let node = taffy
13 .new_with_children(
14 taffy::style::Style {
15 flex_direction: taffy::style::FlexDirection::Column,
16 size: taffy::geometry::Size { width: taffy::style::Dimension::Points(320f32), height: auto() },
17 min_size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Points(0f32) },
18 ..Default::default()
19 },
20 &[node0],
21 )
22 .unwrap();
23 taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
24}