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
Semántico sayk'uy
Mana ima sutichaypas t'ikrakurqanchu: qillqalla, yachachiylla utaq willaylla t'ikrakurqan.
2 qillqakuna · +5 −2
- Cargo.toml +2 −2
- src/compute/grid/explicit_grid.rs +3 −0
diff --git a/Cargo.toml b/Cargo.toml
index 7d27888e1..48e3db293 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,14 +18,14 @@ arrayvec = { version = "0.7", default-features = false }
num-traits = { version = "0.2", default-features = false }
serde = { version = "1.0", optional = true, features = ["serde_derive"] }
slotmap = { version = "1.0.6", optional = true }
-grid = { version = "0.9.0", optional = true }
+grid = { version = "0.10.0", default-features = false, optional = true }
[features]
default = ["std", "flexbox", "grid", "taffy_tree"]
flexbox = []
grid = ["alloc", "dep:grid"]
alloc = []
-std = ["num-traits/std"]
+std = ["num-traits/std", "grid?/std"]
serde = ["dep:serde"]
debug = []
profile = []
diff --git a/src/compute/grid/explicit_grid.rs b/src/compute/grid/explicit_grid.rs
index 9cf90dc67..af4b5a18e 100644
--- a/src/compute/grid/explicit_grid.rs
+++ b/src/compute/grid/explicit_grid.rs
@@ -9,6 +9,9 @@ use crate::util::MaybeMath;
use crate::util::ResolveOrZero;
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)