Upgrade `grid` dependency to `0.10` (#473)
* Upgrade `grid` dependency * Only enable std feature in grid crate if Taffy's std feature is enabled * Fix grid+alloc compilation
Semantic delta
No definition changed: this change is text, documentation or data.
2 files · +5 −2
- Cargo.toml +2 −2
- src/compute/grid/explicit_grid.rs +3 −0
diff --git a/Cargo.toml b/Cargo.toml
index 0dd5e477a..e9a3e2095 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -19,13 +19,13 @@ num-traits = { version = "0.2", default-features = false }
rand = { version = "0.8.5", optional = true }
serde = { version = "1.0", optional = true, features = ["serde_derive"] }
slotmap = "1.0.6"
-grid = { version = "0.9.0", optional = true }
+grid = { version = "0.10.0", default-features = false, optional = true }
[features]
default = ["std", "grid"]
grid = ["alloc", "dep:grid"]
alloc = []
-std = ["num-traits/std"]
+std = ["num-traits/std", "grid?/std"]
serde = ["dep:serde"]
random = ["dep:rand"]
yoga_benchmark = []
diff --git a/src/compute/grid/explicit_grid.rs b/src/compute/grid/explicit_grid.rs
index ef04a61fb..8f7125f33 100644
--- a/src/compute/grid/explicit_grid.rs
+++ b/src/compute/grid/explicit_grid.rs
@@ -9,6 +9,9 @@ use crate::style_helpers::TaffyAuto;
use crate::sys::{GridTrackVec, Vec};
use core::cmp::{max, min};
+#[cfg(not(feature = "std"))]
+use num_traits::float::FloatCore;
+
/// Compute the number of rows and columns in the explicit grid
pub(crate) fn compute_explicit_grid_size_in_axis(style: &Style, axis: AbsoluteAxis) -> u16 {
// Load the grid-template-rows or grid-template-columns definition (depending on the axis)