⎇ 6652882a96948b4d8ee433a176d428cf3c3916bf
benches/generated/measure_root.rs
Historia
Quién tocó qué
crudo
Convert measure tests to gentests (#292)
1pub fn compute() {
2 #[allow(unused_imports)]
3 use taffy::prelude::*;
4 let mut taffy = taffy::Taffy::new();
5 let node = taffy
6 .new_leaf_with_measure(
7 taffy::style::Style { ..Default::default() },
8 taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
9 const TEXT: &str = "HHHHHH";
10 super::measure_standard_text(known_dimensions, available_space, TEXT)
11 }),
12 )
13 .unwrap();
14 taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
15}