dcSpark / cardano-multiplatform-lib

Rust implementation of Cardano
MIT License
98 stars 36 forks source link

BigInt to u128 #296

Closed oskin1 closed 9 months ago

SebastienGllmt commented 9 months ago

Although this PR was already merged, probably this wasn't the right way to implement this. Rust comes with From and TryFrom traits for cases like this, and the only reason we had the as_u128 pattern was because WASM needs explicit functions (which is no longer a concern with our Rust / WASM split)

This is not a big deal, but especially in cases like this where we only modified the Rust code and not the WASM code, we should probably do the more Rust-idiomatic approach

I created an issue for this: https://github.com/dcSpark/cardano-multiplatform-lib/issues/304