-
Notifications
You must be signed in to change notification settings - Fork 202
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
Require Default on all num types #751
Conversation
This is an alternative, simpler take on georust#110 Adding default constraint allows georust/geo#751
geo/CHANGES.md
Outdated
@@ -2,7 +2,7 @@ | |||
|
|||
## Unreleased | |||
|
|||
* | |||
* Add `Default` constraint to all `CoordNum`/`CoordFloat` values. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Add `Default` constraint to all `CoordNum`/`CoordFloat` values. | |
* BREAKING: Add `Default` constraint to all `CoordNum`/`CoordFloat` values. |
This would be a breaking change for geo-types right?
I'm not opposed to the new behavior, but it seems like a pretty small QOL improvement.
As such, I'd advocate for holding off on merging this until we have a batch of other more significant reasons to break geo-types.
What do other people think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michaelkirk I'm ok to hold off the default trait. What about other changes - should i split them into a separate PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about other changes
I'm not sure what remains. Do you mean this?
- T: ::num_traits::Float + ::rstar_0_9::RTreeNum,
+ T: CoordFloat + ::rstar_0_9::RTreeNum,
Isn't that also a breaking change?
If there's some non-breaking changes that I missed that you'd like merged, I'd recommend splitting them out.
Also use CoordFloat instead of Float in rstar This PR requires simultaneous modification to the proj repo. See georust#746
This PR requires georust/proj#110 or georust/proj#111 to be released first. See #746 of a potential solution.
Default
trait constraint toCoordNum
andCoordFloat
CoordFloat
instead of::num_traits::Float
for rstarCHANGES.md
if knowledge of this change could be valuable to users.