diff --git a/fixed_wide/src/fixed.rs b/fixed_wide/src/fixed.rs index 52284d9..47ae1a9 100644 --- a/fixed_wide/src/fixed.rs +++ b/fixed_wide/src/fixed.rs @@ -68,6 +68,19 @@ macro_rules! impl_operator { } } } + impl core::ops::$trait for $struct + where + BInt:::From, + { + type Output = $output; + + fn $method(self, other: U) -> Self::Output { + Self { + bits:self.bits.$method(BInt::::from(other)< core::ops::$trait for $struct + where + BInt:::From, + { + fn $method(&mut self, other: U) { + self.bits.$method(BInt::::from(other)<