gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 5364Rust 86Markdown 12TOML 91841 Definiciones

Update the basic example to use the new API

9f3dd03d7f38ddc215fbeb4542510bdc4fb77574 · por David Flemström · (hace 6 años) · padre d6e5ba1e6 · ver el árbol en este commit

Delta semántico · 1

examples/basic.rs

  • cambió por dentro fn main

1 archivos · +2 −2

diff --git a/examples/basic.rs b/examples/basic.rs
index e1dcea99e..d80564393 100644
--- a/examples/basic.rs
+++ b/examples/basic.rs
@@ -5,7 +5,7 @@ fn main() -> Result<(), stretch::Error> {
     let mut stretch = stretch::node::Stretch::new();
     let child = stretch.new_node(
         Style { size: Size { width: Dimension::Percent(0.5), height: Dimension::Auto }, ..Default::default() },
-        vec![],
+        &[],
     )?;
     let node = stretch.new_node(
         Style {
@@ -13,7 +13,7 @@ fn main() -> Result<(), stretch::Error> {
             justify_content: JustifyContent::Center,
             ..Default::default()
         },
-        vec![child],
+        &[child],
     )?;
 
     stretch.compute_layout(node, Size::undefined())?;