feat(engine): support f32 TryFromJs#5444
Conversation
|
I have a few issues with this one, and they're more philosophical than technical. Two points:
So in the end I'd rather a user converts a JS type to I'm willing to hear a counterargument, but this is actually the reason we've not implemented There is a slight loss of performance when doing integers JsValues to f64 to f32 conversions instead of doing f32 directly, but that's so minimal that I don't think it would matter in a real application. |
|
Yeah, that's fair. One small thing though: Either way I'll close this. Want me to do a quick docs PR instead saying |
Fixes #5360.
Summary
TryFromJsforf32TypeErrorfor non-number valuesTesting
cargo test --workspacecargo check --workspace --all-targetscargo test -p boa_enginecargo clippy -p boa_engine --all-targets -- -D warningscargo fmt --all -- --check