tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 583HTML 275Markdown 8TOML 41586 Definiciones

⎇ 272bca7d9b110816a1ac3ff828d441f4acb3449f benches/generated/flex_basis_smaller_than_content_column.rs Rust · 24 líneas · 1.0 KB Historia Quién tocó qué crudo

Generate benchmarks for all test fixtures 272bca7d9 · Emil Sjölander ·

1pub fn compute() -> stretch::layout::Node {
2    stretch::compute(
3        &stretch::style::Node {
4            flex_direction: stretch::style::FlexDirection::Column,
5            size: stretch::geometry::Size { height: stretch::style::Dimension::Points(100f32), ..Default::default() },
6            children: vec![stretch::style::Node {
7                flex_direction: stretch::style::FlexDirection::Column,
8                flex_basis: stretch::style::Dimension::Points(50f32),
9                children: vec![stretch::style::Node {
10                    size: stretch::geometry::Size {
11                        width: stretch::style::Dimension::Points(100f32),
12                        height: stretch::style::Dimension::Points(100f32),
13                        ..Default::default()
14                    },
15                    ..Default::default()
16                }],
17                ..Default::default()
18            }],
19            ..Default::default()
20        },
21        stretch::geometry::Size::undefined(),
22    )
23    .unwrap()
24}