georust / wkt

Rust read/write support for well-known text (WKT)
https://crates.io/crates/wkt
Apache License 2.0
51 stars 25 forks source link

Reduce usage of `let GeoType(a) = b` #84

Open nyurik opened 2 years ago

nyurik commented 2 years ago

Constructs such as

let &geo_types::LineString(ref g_points) = g_line;
w_lines.push(g_points_to_w_linestring(g_points));

cannot be easily ported if we introduce 3D/M coordinates. This PR changes them to the direct tuple access. Eventually we may want to create dedicated tuple member accessors instead.

w_lines.push(g_points_to_w_linestring(&g_line.0));