diff --git a/fixed_wide_vectors/src/macros/mod.rs b/fixed_wide_vectors/src/macros/mod.rs index 4cf9651..abd22ee 100644 --- a/fixed_wide_vectors/src/macros/mod.rs +++ b/fixed_wide_vectors/src/macros/mod.rs @@ -244,7 +244,7 @@ macro_rules! impl_vector { #[macro_export(local_inner_macros)] macro_rules! impl_operator { ( $struct: ident { $($field: ident), + }, $trait: ident, $method: ident, $output: ty ) => { - impl> core::ops::$trait for $struct { + impl> core::ops::$trait for $struct { type Output = $output; fn $method(self, other: Self) -> Self::Output { @@ -253,12 +253,11 @@ macro_rules! impl_operator { } } } - - impl + Copy> core::ops::$trait for $struct { + impl+Copy> core::ops::$trait for $struct{ type Output = $output; fn $method(self, other: T) -> Self::Output { - Self { + $struct { $( $field: self.$field.$method(other) ), + } }