tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 5544Rust 88Markdown 11TOML 91926 Definiciones

Clarify documentation (#206)

Had some confusion when I was using this library due to the wording being "positive" and not "nonnegative," thought that 1 must mean no stretching instead of 0.

b46f2b1ff5c6ce5aa0b1891e6fa80b4b83155ac9 · por Testare · (hace 4 años) · padre c3f6a1727 · ver el árbol en este commit

Delta semántico

Ninguna definición cambió: el cambio es de texto, documentación o datos.

1 archivos · +2 −2

diff --git a/src/style.rs b/src/style.rs
index a11d33ba8..4ea166ccd 100644
--- a/src/style.rs
+++ b/src/style.rs
@@ -392,11 +392,11 @@ pub struct FlexboxLayout {
     pub border: Rect<Dimension>,
     /// The relative rate at which this item grows when it is expanding to fill space
     ///
-    /// 0.0 is the default value, and this value must be positive.
+    /// 0.0 is the default value, and this value must not be negative.
     pub flex_grow: f32,
     /// The relative rate at which this item shrinks when it is contracting to fit into space
     ///
-    /// 1.0 is the default value, and this value must be positive.
+    /// 1.0 is the default value, and this value must not be negative.
     pub flex_shrink: f32,
     /// Sets the initial main axis size of the item
     pub flex_basis: Dimension,