diff -r cc0c6a8d0933 -r 07e487685b29 src/direct_product.rs
--- a/src/direct_product.rs Thu May 01 02:09:50 2025 -0500
+++ b/src/direct_product.rs Thu May 01 02:13:44 2025 -0500
@@ -125,26 +125,26 @@
impl_binary!(Sub, sub);
macro_rules! impl_scalar {
- ($trait:ident, $fn:ident, $F:ty) => {
- impl $trait<$F> for Pair
+ ($trait:ident, $fn:ident) => {
+ impl $trait for Pair
where
- A: $trait<$F>,
- B: $trait<$F>,
+ A: $trait,
+ B: $trait,
{
type Output = Pair;
- fn $fn(self, t: $F) -> Self::Output {
+ fn $fn(self, t: F) -> Self::Output {
let Pair(a, b) = self;
Pair(a.$fn(t), b.$fn(t))
}
}
- impl<'a, A, B> $trait<$F> for &'a Pair
+ impl<'a, A, B, F: Num> $trait for &'a Pair
where
- &'a A: $trait<$F>,
- &'a B: $trait<$F>,
+ &'a A: $trait,
+ &'a B: $trait,
{
- type Output = Pair<<&'a A as $trait<$F>>::Output, <&'a B as $trait<$F>>::Output>;
- fn $fn(self, t: $F) -> Self::Output {
+ type Output = Pair<<&'a A as $trait>::Output, <&'a B as $trait>::Output>;
+ fn $fn(self, t: F) -> Self::Output {
let Pair(ref a, ref b) = self;
Pair(a.$fn(t), b.$fn(t))
}
@@ -177,10 +177,10 @@
};
}
-impl_scalar!(Mul, mul, f32);
-impl_scalar!(Mul, mul, f64);
-impl_scalar!(Sub, sub, f32);
-impl_scalar!(Sub, sub, f64);
+impl_scalar!(Mul, mul);
+//impl_scalar!(Mul, mul, f64);
+impl_scalar!(Sub, sub);
+//impl_scalar!(Sub, sub, f64);
macro_rules! impl_scalar_lhs {
($trait:ident, $fn:ident, $F:ty) => {