georust / gpx

Rust read/write support for GPS Exchange Format (GPX)
https://crates.io/crates/gpx
MIT License
102 stars 46 forks source link

please upgrade geo and geo-types dependency #47

Closed luogni closed 3 years ago

luogni commented 3 years ago

Hi, I'm using gpx crate in a program together with geo and geo-types. When compiling I get:

error[E0308]: mismatched types
   --> src/context.rs:166:37
    |
166 |                         coords.push(f.point());
    |                                     ^^^^^^^^^ expected struct `geo::Point`, found struct `geo_types::point::Point`
    |
    = note: expected struct `geo::Point<f64>`
               found struct `geo_types::point::Point<f64>`
    = note: perhaps two different versions of crate `geo_types` are being used?

error[E0599]: no method named `geodesic_distance` found for struct `geo_types::point::Point<f64>` in the current scope
   --> src/context.rs:174:36
    |
174 |                         let d = p1.geodesic_distance(&p2);
    |                                    ^^^^^^^^^^^^^^^^^ method not found in `geo_types::point::Point<f64>`

I can solve this updating geo and geo-types dependency on a local gpx crate. How should this work on Rust? Should gpx always be in sync with latest geo release? Should gpx re-export geo crate? Sorry but I'm not a Rust expert!

urschrei commented 3 years ago

This is fixed in #52. We're waiting on a couple of other PRs, and will cut a release within the week.