The default FromPrimitive implementation for BigDecimal::from_u128 and BigDecimal::from_i128 goes through u64 and i64 respectively, rendering the default implementation useless as any number greater than 64 bits won't be parseable into a 128 bit number. The default implementation currently used can be found here:
The default FromPrimitive implementation for
BigDecimal::from_u128
andBigDecimal::from_i128
goes throughu64
andi64
respectively, rendering the default implementation useless as any number greater than 64 bits won't be parseable into a 128 bit number. The default implementation currently used can be found here:https://github.com/rust-num/num-traits/blob/4ac94b4136ea06d0bd0e1b8abe30c55a45acffdf/src/cast.rs#L476
I have overridden the default implementation so that this function actually works as intended.