Skip to content

Conversation

@jcapriot
Copy link

Adds the missing three implementations for mixed Complex and Real MulAdd trait.

I see it was noted in #37 that there would be 8 total, and you did not want to support all of them, but because you can't implement the traits for T (T nor MulAdd are both external to the crate), there's only 4 total to implement here (1 of the 8 is implicitly MulAdd<T, T> for T).

Complex::new(re, im)
}
}
impl<'a, 'b, T: Clone + Num + MulAdd<Output = T>> MulAdd<&'b T, &'b Complex<T>> for &'a Complex<T> {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only question to someone more versed in lifetimes: should each of the reference to the input have the same lifetime parameter, or should there be three lifetimes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant