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

Parse inner GeoJson members directly from str #188

Merged
merged 1 commit into from
May 27, 2022

Conversation

michaelkirk
Copy link
Member

  • I agree to follow the project's code of conduct.
  • I added an entry to CHANGES.md if knowledge of this change could be valuable to users.

A small ergonomics tweak:

Before:

let gj = geojson::GeoJson::from_str(#r"{"type": "Geometry", "coordinates": [1, 2]}"#);
let geom = geojson::Geometry::try_from(gj);

After:

let geom = geojson::Geometry::from_str(#r"{"type": "Geometry", "coordinates": [1, 2]}"#);

@urschrei
Copy link
Member

Oh, nice!

@michaelkirk michaelkirk force-pushed the mkirk/parse-feature-collection branch from 0db2aca to 39301f7 Compare May 27, 2022 16:49
Before:

    let gj = geojson::GeoJson::from_str(#r"{"type": "Geometry", "coordinates": [1, 2]}"#);
    let geom = Geometry::try_from(gj);

After:

    let geom = geojson::Geometry::from_str(#r"{"type": "Geometry", "coordinates": [1, 2]}"#);
@michaelkirk michaelkirk force-pushed the mkirk/parse-feature-collection branch from 39301f7 to 24769fc Compare May 27, 2022 16:50
@michaelkirk
Copy link
Member Author

rebased to fix conflict in CHANGES.md

bors r=urschrei

@bors
Copy link
Contributor

bors bot commented May 27, 2022

Build succeeded:

@bors bors bot merged commit 5d30e4e into master May 27, 2022
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.

2 participants