-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix stack overflow when converting
GeometryCollection
scalar to geo (…
…#984) As described in a contained comment: We can't implement both ``` impl From<GeometryCollection<'_>> for geo::GeometryCollection ``` and ``` impl From<GeometryCollection<'_>> for geo::Geometry ``` because of this problematic blanket impl (https://github.com/georust/geo/blob/ef55eabe9029b27f753d4c40db9f656e3670202e/geo-types/src/geometry/geometry_collection.rs#L113-L120). Thus we need to choose either one or the other to implement. If we implemented only `for geo::Geometry`, then the default blanket impl for `geo::GeometryCollection` would be **wrong** because it would doubly-nest the `GeometryCollection`: ```rs GeometryCollection( [ GeometryCollection( GeometryCollection( [ Point( Point( Coord { x: 0.0, y: 0.0, }, ), ), ], ), ), ], ) ``` Therefore we must implement only `for geo::GeometryCollection` Closes #979
- Loading branch information
1 parent
001aa42
commit 58db3cc
Showing
2 changed files
with
108 additions
and
5 deletions.
There are no files selected for viewing
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 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