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 breakage with Order.min and Order.max on nightly #21

Merged
merged 1 commit into from
Aug 23, 2017

Conversation

KodrAus
Copy link
Contributor

@KodrAus KodrAus commented Aug 22, 2017

In rust-lang/rust#42496, min and max methods have been added to the Ord trait, which causes an issue using glm's BaseNum::min/max functions for a type that implements Ord. This was reported here

This PR currently just clarifies which min/max function to use in the docs to fix tests. It's probably not what you want long-term. If you require BaseNum to be compared, then you could add an Ord bound and remove the min and max methods.

@KodrAus
Copy link
Contributor Author

KodrAus commented Aug 22, 2017

cc: @dche

@KodrAus KodrAus changed the title Specify min max fns to use in docs Fix breakage with Order.min and Order.max on nightly Aug 22, 2017
@dche dche merged commit 26b3b23 into dche:master Aug 23, 2017
@dche
Copy link
Owner

dche commented Aug 23, 2017

Thanks!

BaseNum can not have Ord trait because f32 and f64 are not Eq. Since in the users' code the crate level functions glm::min/glm::max should always be used, your fix is completely OK.

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.

2 participants