You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's possible to add, and you can emulate this now with T::min_value() < T::zero(), which is probably how we would write a default implementation in the trait.
Since the to_* methods return Option, you could also write it based on the runtime values like this:
ifletSome(i) = v.to_i64(){// signed operations using `i`}else{let u = v.to_u64().expect("unsigned number");}
When working in a generic context, it would be useful to access whether a PrimInt-based generic type is signed or not signed at build time.
The text was updated successfully, but these errors were encountered: