add trait from<u128> to Num
This commit is contained in:
parent
f8c79609bb
commit
633649ad7e
|
@ -22,4 +22,10 @@ impl std::ops::Mul<u128> for Num {
|
|||
fn mul(self, rhs: u128) -> Self::Output {
|
||||
self.number * rhs
|
||||
}
|
||||
}
|
||||
|
||||
impl From<u128> for Num {
|
||||
fn from(number: u128) -> Self {
|
||||
Num { number }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue