-
Notifications
You must be signed in to change notification settings - Fork 199
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
Use Point::from(c)
instead of Point(c)
#777
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Mar 17, 2022
lnicola
approved these changes
Mar 17, 2022
lnicola
approved these changes
Mar 17, 2022
1 task
bors bot
added a commit
that referenced
this pull request
Mar 17, 2022
779: Use `LineString::from()` instead of `LineString()` r=lnicola a=nyurik Make migration simpler by using static function that will still be available if `LineString` becomes a type alias. Similar to #777 - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - ~[ ] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users.~ --- Co-authored-by: Yuri Astrakhan <YuriAstrakhan@gmail.com>
nyurik
added a commit
to nyurik/geo
that referenced
this pull request
Mar 18, 2022
Make migration simpler by using static function that will still be available if `LineString` becomes a type alias. Similar to georust#777 - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - ~[ ] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users.~ ---
1 task
nyurik
added a commit
to nyurik/geo
that referenced
this pull request
Mar 18, 2022
Make migration simpler by using static function that will still be available if `MultiPolygon` becomes a type alias. Similar to georust#777
nyurik
added a commit
to nyurik/geo
that referenced
this pull request
Mar 18, 2022
Make migration simpler by using static function that will still be available if `GeometryCollection` becomes a type alias. Note that `GeometryCollection::new()` already exists, and is the same as ::default(). I couldn't find any usages of it. I made `new()` deprecated, but the new method had to be something else - `new_from(val)`. Ideally, `new_from` should become `new(val)` Similar to georust#777
1 task
nyurik
added a commit
to nyurik/geo
that referenced
this pull request
Mar 18, 2022
Make migration simpler by using static function that will still be available if `GeometryCollection` becomes a type alias. Note that `GeometryCollection::new()` already exists, and is the same as ::default(). I couldn't find any usages of it. I made `new()` deprecated, but the new method had to be something else - `new_from(val)`. Ideally, `new_from` should become `new(val)` Similar to georust#777
nyurik
added a commit
to nyurik/geo
that referenced
this pull request
Mar 18, 2022
Make migration simpler by using static function that will still be available if `Triangle` becomes a type alias. Similar to georust#777
1 task
nyurik
added a commit
to nyurik/geo
that referenced
this pull request
Mar 18, 2022
Make migration simpler by using static function that will still be available if `MultiLineString` becomes a type alias. Similar to georust#777
1 task
nyurik
added a commit
to nyurik/geo
that referenced
this pull request
Mar 18, 2022
Make migration simpler by using static function that will still be available if `MultiLineString` becomes a type alias. Similar to georust#777
nyurik
added a commit
to nyurik/geo
that referenced
this pull request
Mar 18, 2022
Make migration simpler by using static function that will still be available if `MultiPoint` becomes a type alias. Similar to georust#777
nyurik
added a commit
to nyurik/geo
that referenced
this pull request
Mar 18, 2022
Make migration simpler by using static function that will still be available if `LineString` becomes a type alias. Similar to georust#777
… ctor. This will simplify migration to a different base type because type aliases do not support tuple instantiation. Note that unlike the other similar PRs with `::new(v)`, this one uses the existing `Point::from(v)` fn because it directly assigns consumed values instead of converting them, and because it already has a `Point::new(x, y)`
bors bot
added a commit
that referenced
this pull request
Mar 19, 2022
781: Use `LineString::new()` instead of `LineString()` r=frewsxcv a=nyurik Make migration simpler by using static function that will still be available if `LineString` becomes a type alias. Similar to #777 - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - ~[ ] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users.~ --- Co-authored-by: Yuri Astrakhan <YuriAstrakhan@gmail.com>
nyurik
added a commit
to nyurik/geo
that referenced
this pull request
Mar 19, 2022
Make migration simpler by using static function that will still be available if `MultiLineString` becomes a type alias. Similar to georust#777
nyurik
added a commit
to nyurik/geo
that referenced
this pull request
Mar 19, 2022
Make migration simpler by using static function that will still be available if `MultiPolygon` becomes a type alias. Similar to georust#777
nyurik
added a commit
to nyurik/geo
that referenced
this pull request
Mar 19, 2022
Make migration simpler by using static function that will still be available if `Triangle` becomes a type alias. Similar to georust#777
nyurik
added a commit
to nyurik/geo
that referenced
this pull request
Mar 19, 2022
Make migration simpler by using static function that will still be available if `GeometryCollection` becomes a type alias. Note that `GeometryCollection::new()` already exists, and is the same as ::default(). I couldn't find any usages of it. I made `new()` deprecated, but the new method had to be something else - `new_from(val)`. Ideally, `new_from` should become `new(val)` Similar to georust#777
nyurik
added a commit
to nyurik/geo
that referenced
this pull request
Mar 19, 2022
Make migration simpler by using static function that will still be available if `MultiLineString` becomes a type alias. Similar to georust#777
2 tasks
nyurik
added a commit
to nyurik/geo
that referenced
this pull request
Mar 19, 2022
Make migration simpler by using static function that will still be available if `GeometryCollection` becomes a type alias. Note that `GeometryCollection::new()` already exists, and is the same as ::default(). I couldn't find any usages of it. I made `new()` deprecated, but the new method had to be something else - `new_from(val)`. Ideally, `new_from` should become `new(val)` Similar to georust#777
frewsxcv
approved these changes
Mar 19, 2022
bors r+ |
Build succeeded: |
bors bot
added a commit
that referenced
this pull request
Mar 28, 2022
786: Use `MultiPolygon::new()` instead of `MultiPolygon()` r=frewsxcv a=nyurik Make migration simpler by using static function that will still be available if `MultiPolygon` becomes a type alias. Similar to #777 - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - [ ] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users. --- Co-authored-by: Yuri Astrakhan <YuriAstrakhan@gmail.com>
bors bot
added a commit
that referenced
this pull request
Mar 28, 2022
783: Use `Triangle::new()` instead of `Triangle()` r=frewsxcv a=nyurik Make migration simpler by using static function that will still be available if `Triangle` becomes a type alias. Similar to #777 - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - ~[ ] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users.~ --- Co-authored-by: Yuri Astrakhan <YuriAstrakhan@gmail.com>
bors bot
added a commit
that referenced
this pull request
Mar 28, 2022
778: Use `MultiPoint::new()` instead of `MultiPoint()` r=frewsxcv a=nyurik Make migration simpler by using static function that will still be available if `MultiPoint` becomes a type alias. Similar to #777 - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - ~[ ] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users.~ --- Co-authored-by: Yuri Astrakhan <YuriAstrakhan@gmail.com>
nyurik
added a commit
to nyurik/geo
that referenced
this pull request
Mar 28, 2022
Make migration simpler by using static function that will still be available if `GeometryCollection` becomes a type alias. Note that `GeometryCollection::new()` already exists, and is the same as ::default(). I couldn't find any usages of it. I made `new()` deprecated, but the new method had to be something else - `new_from(val)`. Ideally, `new_from` should become `new(val)` Similar to georust#777
nyurik
added a commit
to nyurik/geo
that referenced
this pull request
Mar 28, 2022
Make migration simpler by using static function that will still be available if `MultiLineString` becomes a type alias. Similar to georust#777
bors bot
added a commit
that referenced
this pull request
Mar 28, 2022
784: Use `MultiLineString::new()` instead of `MultiLineString()` r=frewsxcv a=nyurik Make migration simpler by using static function that will still be available if `MultiLineString` becomes a type alias. Similar to #777 - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - ~[ ] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users.~ --- Co-authored-by: Yuri Astrakhan <YuriAstrakhan@gmail.com>
bors bot
added a commit
that referenced
this pull request
Mar 28, 2022
782: Use `GeometryCollection::new_from()` instead of `GeometryCollection()` r=frewsxcv a=nyurik Make migration simpler by using static function that will still be available if `GeometryCollection` becomes a type alias. Note that `GeometryCollection::new()` already exists, and is the same as ::default(). I couldn't find any usages of it. I made `new()` deprecated, but the new method had to be something else - `new_from(val)`. Ideally, `new_from` should become `new(val)` Similar to #777 - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - ~[ ] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users.~ --- Co-authored-by: Yuri Astrakhan <YuriAstrakhan@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Per discussion in #775, use the static from() instead of tuple ctor.
This will simplify migration to a different base type because type aliases do not support tuple instantiation.
Note that unlike the other similar PRs with
::new(v)
, this one uses the existingPoint::from(v)
fn because it directly assigns consumed values instead of converting them, and because it already has aPoint::new(x, y)
[ ] I added an entry toCHANGES.md
if knowledge of this change could be valuable to users.