Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove Scalar trait bound for Matrix PartialEq and Eq #1227

Merged
merged 1 commit into from
Apr 15, 2023
Merged

fix: remove Scalar trait bound for Matrix PartialEq and Eq #1227

merged 1 commit into from
Apr 15, 2023

Conversation

hqurve
Copy link
Contributor

@hqurve hqurve commented Apr 8, 2023

I believe that the Matrix PartialEq implementation does not require that T implements Scalar.

Removing this bound would allow for users to derive PartialEq on custom generic structures without requiring that T: Scalar. For example

#[derive(PartialEq)]
struct MyCoolStructure<T>{
     m: Vector2<T>
}

@Andlon
Copy link
Sponsor Collaborator

Andlon commented Apr 14, 2023

I can't think of anything negative consequences of this, and I like the justification.

@sebcrozet sebcrozet merged commit 0996b65 into dimforge:dev Apr 15, 2023
12 checks passed
@sebcrozet
Copy link
Member

Thanks!

@hqurve hqurve deleted the remove-scalar-requirement branch April 15, 2023 14:43
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.

None yet

4 participants