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

create a geo::geometries module that re-exports all the geometry members #831

Closed
michaelkirk opened this issue May 12, 2022 · 0 comments · Fixed by #853
Closed

create a geo::geometries module that re-exports all the geometry members #831

michaelkirk opened this issue May 12, 2022 · 0 comments · Fixed by #853

Comments

@michaelkirk
Copy link
Member

michaelkirk commented May 12, 2022

I often see client code like this:

use geo_types::{
    Geometry, GeometryCollection, Line, LineString, MultiLineString, MultiPoint, MultiPolygon, Polygon, Rect, Point, Coord,
};

use geo_types::{coord,  point, line_string, polygon}; 

Instead I'd like to:

   use geo_types::geometries::*;
   use geo_types::geometries::macros::*;

And re-export them as geo::geometries/geo::geometries::macros.

In general, I'm not a fan of large wild card imports because later in the code it's hard to know where something came from, but for cases like this when it's a small number of well known things, I think it's helpful with little downside.

This would be a non-breaking change - the old paths would remain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant