add trait from<u128> to Num

This commit is contained in:
b1ek 2023-08-01 14:40:35 +10:00
parent f8c79609bb
commit 633649ad7e
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 6 additions and 0 deletions

View File

@ -23,3 +23,9 @@ impl std::ops::Mul<u128> for Num {
self.number * rhs
}
}
impl From<u128> for Num {
fn from(number: u128) -> Self {
Num { number }
}
}