Skip to content
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

Add conversions from Line, Triangle, Rect and GeometryCollection #136

Merged
merged 4 commits into from
Sep 3, 2020

Conversation

urschrei
Copy link
Member

@urschrei urschrei commented Sep 3, 2020

Closes #133

Copy link
Member

@michaelkirk michaelkirk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

lgtm

@@ -46,6 +46,42 @@ where
}
}

#[cfg_attr(docsrs, doc(cfg(feature = "geo-types")))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea what this line accomplishes?

It seems similar to this rust-lang/rust#43348 which produces output in the docs like this "Unix only" label:

Screen Shot 2020-09-03 at 9 47 09 AM

Looks like it was originally added for quick_collection in 12c4f18 but I don't see any effect:
Screen Shot 2020-09-03 at 9 49 58 AM

No need to change anything in this PR - I realize this was copied from the similar methods in this file, just curious if anyone has context to see if it's working as intended.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was my attempt at adding a marker to the docs to indicate that it's only available when the geo-types feature is activated, but that functionality has either changed slightly, or I screwed it up: https://stackoverflow.com/a/61417700/416626

geo_types::Geometry::MultiLineString(ref multi_line_string) => {
geometry::Value::from(multi_line_string)
}
geo_types::Geometry::Polygon(ref polygon) => geometry::Value::from(polygon),
geo_types::Geometry::MultiPolygon(ref multi_polygon) => {
geometry::Value::from(multi_polygon)
}
_ => panic!("GeometryCollection not allowed"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@bors
Copy link
Contributor

bors bot commented Sep 3, 2020

Build succeeded:

@bors bors bot merged commit 990ad56 into georust:master Sep 3, 2020
bors bot added a commit that referenced this pull request Sep 3, 2020
138: Fix feature labels for docs.rs r=urschrei a=urschrei

Following up on #136 (comment)

See here: https://stackoverflow.com/a/61417700/416626

Co-authored-by: Stephan Hügel <shugel@tcd.ie>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement conversions for Line, GeometryCollection, Rect, Triangle
2 participants