gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 5364Rust 86Markdown 12TOML 91841 Sutichaykuna

evenly_sized_tracks - fix simple compile error (#643)

flex's argument needs to be Into<f32>, a plain float literal is f64 which does not work, I just specified that the argument here is f32

9f27870656a06f125f63b46e37c2038fcca1818e · ruwaq DavidM603 · (2 wata ñawpaq) · tayta e8aef0c70 · kay commitpi sach'ata qhaway

Semántico sayk'uy · 1

src/style_helpers.rs

1 qillqakuna · +1 −1

diff --git a/src/style_helpers.rs b/src/style_helpers.rs
index 1f4d43cb9..9701a6a59 100644
--- a/src/style_helpers.rs
+++ b/src/style_helpers.rs
@@ -55,7 +55,7 @@ mod repeat_fn_tests {
 pub fn evenly_sized_tracks(count: u16) -> Vec<TrackSizingFunction> {
     use crate::util::sys::new_vec_with_capacity;
     let mut repeated_tracks = new_vec_with_capacity(1);
-    repeated_tracks.push(flex(1.0));
+    repeated_tracks.push(flex(1.0f32));
     let mut tracks = new_vec_with_capacity(1);
     tracks.push(repeat(count, repeated_tracks));
     tracks