DRY up WKT macros#142
Merged
michaelkirk merged 3 commits intomainfrom Apr 24, 2025
Merged
Conversation
649dd34 to
a785d39
Compare
a785d39 to
c622f69
Compare
kylebarron
reviewed
Apr 17, 2025
| ]).unwrap() | ||
| }; | ||
| #[allow(unused)] | ||
| const fn equal_dims(a: Dimension, b: Dimension) -> bool { |
Member
There was a problem hiding this comment.
Does this need to be pub to be accessible from the macro outside of this repo?
kylebarron
reviewed
Apr 17, 2025
| macro_rules! geometry_collection { | ||
| (EMPTY) => { | ||
| GeometryCollection::empty(Dimension::XY) | ||
| $crate::types::GeometryCollection::empty(Dimension::XY) |
Member
There was a problem hiding this comment.
Does this need to be
Suggested change
| $crate::types::GeometryCollection::empty(Dimension::XY) | |
| $crate::types::GeometryCollection::empty($crate::types::Dimension::XY) |
kylebarron
reviewed
Apr 17, 2025
| macro_rules! multi_polygon_m { | ||
| (()) => { | ||
| compile_error!("use `MULTIPOLYGON M EMPTY` for a MultiPolygon with no coordinates") | ||
| $crate::types::MultiPolygon::empty(Dimension::XY) |
Member
There was a problem hiding this comment.
Suggested change
| $crate::types::MultiPolygon::empty(Dimension::XY) | |
| $crate::types::MultiPolygon::empty($crate::types::Dimension::XY) |
3 tasks
Member
|
geoarrow/geoarrow-rs#1061 compiles without errors using the branch in #143 with a couple macro hygiene updates |
Member
|
This is way more concise and elegant than my version 🙂 |
Closed
kylebarron
approved these changes
Apr 24, 2025
This file contains hidden or 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
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.

CHANGES.mdif knowledge of this change could be valuable to users.