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
Although this PR was already merged, probably this wasn't the right way to implement this. Rust comes with
From
andTryFrom
traits for cases like this, and the only reason we had theas_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