From 1a56128a7917ba89045db5a71cb63b60b05c2b5e Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 29 Aug 2024 15:50:44 -0700 Subject: [PATCH] conflicting --- deferred_division/src/ratio.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/deferred_division/src/ratio.rs b/deferred_division/src/ratio.rs index c5abad4..edc386e 100644 --- a/deferred_division/src/ratio.rs +++ b/deferred_division/src/ratio.rs @@ -86,6 +86,21 @@ macro_rules! impl_operator { } } } + impl core::ops::$trait<$struct> for Lhs + where + Den:Copy, + Lhs:Mul, + >::Output:core::ops::$trait, + { + type Output=$struct<<>::Output as core::ops::$trait>::Output,Den>; + + fn $method(self,rhs:$struct)->Self::Output{ + $struct{ + num:self.mul(rhs.den).$method(rhs.num), + den:rhs.den, + } + } + } }; } macro_rules! impl_assign_operator{