cant do it man

This commit is contained in:
Quaternions 2024-08-28 12:54:38 -07:00
parent a923a6b5d1
commit cc3cb35309

View File

@ -244,7 +244,7 @@ macro_rules! impl_vector {
#[macro_export(local_inner_macros)] #[macro_export(local_inner_macros)]
macro_rules! impl_operator { macro_rules! impl_operator {
( $struct: ident { $($field: ident), + }, $trait: ident, $method: ident, $output: ty ) => { ( $struct: ident { $($field: ident), + }, $trait: ident, $method: ident, $output: ty ) => {
impl<T: core::ops::$trait<Output = T>> core::ops::$trait<Self> for $struct<T> { impl<T:core::ops::$trait<Output=T>> core::ops::$trait for $struct<T> {
type Output = $output; type Output = $output;
fn $method(self, other: Self) -> Self::Output { fn $method(self, other: Self) -> Self::Output {
@ -253,12 +253,11 @@ macro_rules! impl_operator {
} }
} }
} }
impl<T:core::ops::$trait<Output=T>+Copy> core::ops::$trait<T> for $struct<T>{
impl<T: core::ops::$trait<Output = T> + Copy> core::ops::$trait<T> for $struct<T> {
type Output = $output; type Output = $output;
fn $method(self, other: T) -> Self::Output { fn $method(self, other: T) -> Self::Output {
Self { $struct {
$( $field: self.$field.$method(other) ), + $( $field: self.$field.$method(other) ), +
} }
} }