add trait to convert Num to u128

This commit is contained in:
b1ek 2023-08-02 20:21:38 +10:00
parent 8f3bb2cd58
commit 14915d8f31
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 6 additions and 0 deletions

View File

@ -28,4 +28,10 @@ impl From<u128> for Num {
fn from(number: u128) -> Self { fn from(number: u128) -> Self {
Num { number } Num { number }
} }
}
impl From<Num> for u128 {
fn from(value: Num) -> Self {
value.number
}
} }