gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 5544Rust 88Markdown 11TOML 91926 Definitions

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

(cherry picked from commit 9f27870656a06f125f63b46e37c2038fcca1818e)

ea2beedd05271c1038a7d9539f8313e949915a14 · by DavidM603 · (2 years ago) · parent 45394ac87 · browse the tree at this commit

Semantic delta · 1

src/style_helpers.rs

1 files · +1 −1

diff --git a/src/style_helpers.rs b/src/style_helpers.rs
index 5e1c7e21a..737d2068c 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::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