DioxusLabs / taffy

A high performance rust-powered UI layout library
https://docs.rs/taffy
Other
2.04k stars 102 forks source link

Fix panic when GridLine 0 is specified #671

Closed nicoburns closed 2 months ago

nicoburns commented 2 months ago

Objective

Fixes a panic. Nobody should be specifying grid line zero because it's invalid, but as it can be specified it definitely shouldn't panic. We already had logic to fall back to "auto" when "0" is specified but there was a fault in that logic.

Alternatives

We could make GridLine take NonZeroi16.