Skip to content

Fix breakage with Order.min and Order.max on nightly - #21

Merged
dche merged 1 commit into
dche:masterfrom
KodrAus:fix/nightly-doc-error
Aug 23, 2017
Merged

dche merged 1 commit into
dche:masterfrom
KodrAus:fix/nightly-doc-error

Conversation

@KodrAus

@KodrAus KodrAus commented Aug 22, 2017 •

Copy link
Copy Markdown
Contributor

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

KodrAus commented Aug 22, 2017

Copy link
Copy Markdown
Contributor Author

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

dche commented Aug 23, 2017

Copy link
Copy Markdown
Owner

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