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

Re-export Float trait #79

Closed
demurgos opened this issue May 2, 2021 · 1 comment
Closed

Re-export Float trait #79

demurgos opened this issue May 2, 2021 · 1 comment

Comments

@demurgos
Copy link

demurgos commented May 2, 2021

I wanted to write a struct containing an OrderedFloat, but to implement various traits such as Eq or Ord, I need to use the Float trait bound but this trait is defined in num-traits instead of OrderedFloat.

The current situation forces me to add num-traits to my dependencies only to pull the Float trait. It would be nicer if the traits used by OrderedFloat were re-exported.

An important benefit to this is that it ensures that its the correct version of the trait in case there are multiple versions of num-traits in the dependency tree.

mbrubeck added a commit that referenced this issue May 3, 2021
Release notes:

* Add optional `schemars` feature (#78).
* Re-export the `Float` trait (#79).
@mbrubeck
Copy link
Collaborator

mbrubeck commented May 3, 2021

Thanks for the suggestion! This is now implemented in ordered-float 2.2.0.

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

No branches or pull requests

2 participants