-
Notifications
You must be signed in to change notification settings - Fork 8
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
Integrate with num-traits 0.2.*. #10
Comments
One straightforward solution is to implement This would also involve a lot of duplicated code. A macro could help with this, but it's a bit ugly. Since there is no way to address this without a breaking change to num-traits, it will probably be necessary to do something like this. I've opened a related issue against num-traits. |
7d9449a upgrades num-traits to There are some small differences between Decorum's |
This issue is primarily about upgrading to num-traits |
The
0.2.*
series of the num-traits crate includes aReal
trait (introduced in0.1.42
) that is nearly identical to Decorum's. Before hitting0.1.0
, Decorum should integrate with these changes and replace it'sReal
trait with num-traits'.This will be tricky though. num-traits currently provides a blanket implementation such that
T: Float ⇒ T: Real
(i.e.,impl<T> Real for T where T: Float { ... }
). This makes it impossible to write implementations of theFloat
andReal
traits forConstrainedFloat
that are parameterized over the inputFloatConstraint
type. I'm still not sure how to work around this.The text was updated successfully, but these errors were encountered: