-
-
Notifications
You must be signed in to change notification settings - Fork 442
Closed
Labels
InternalCategory for changelogCategory for changeloggood first issueGood for newcomersGood for newcomers
Description
The problem lies in the ability for users to manually construct a JsValue::Rational
from a f64
value that fits within an i32
, as JsValue
is a public enum.
A proposed solution is to introduce a struct that encapsulates the JsValue
enum. By doing so, construction of JsValue::Rational
would be limited to its respective constructor functions.
This would allow us to remove many checks that are done to see if a JsValue::Rational
f64 value can fit in a i32
.
Additional Information
Metadata
Metadata
Assignees
Labels
InternalCategory for changelogCategory for changeloggood first issueGood for newcomersGood for newcomers