dnsl48 / fraction

[Rust] Lossless fractions and decimals; drop-in float replacement
Apache License 2.0
83 stars 25 forks source link

Serialization support for DynaInt #65

Closed optevo closed 2 years ago

optevo commented 2 years ago

Even though I have feature "with-serde-support" on, when I implement a struct or enum that contains DynaInt or any type that uses it and place #[derive(Serialize)] on my type I get:

error: the trait bound DynaInt<u64, BigUint>: Serialize is not satisfied label: the trait Serialize is not implemented for DynaInt<u64, BigUint>

Serialization seems to work fine for GenericDecimal. I'm fairly new to Rust - is there something I'm doing wrong? Or is there some reason serialization is not supported for DynaInt?

dnsl48 commented 2 years ago

I believe that was resolved in #66, thank you for the contribution! The patch is now released with 0.11.2. I am closing this ticket, but if that doesn't solve your issue, please feel free to reopen.