[x] I added an entry to CHANGES.md if knowledge of this change could be valuable to users.
Following up from my post almost a year ago in #59 , I finally got around to finishing this up!
This adds support for the generic CoordFloat trait to all structs provided by this crate. I've tested this locally in my OSS project and the only inconsistency I noticed was serializing with the json! macro from serde_json always resulted in f64 precision, but I wasn't sure if that is something that can be corrected in this crate. When returning the data and letting Actix serialize it with something like HttpResponse::Ok().json(feature), it respected the intended precision.
Notes for the maintainers to review:
I'm still pretty new when it comes to Rust so there may be a lot of things that could be simplified, particularly when it comes to the Error/Result generics that were added in to account for the one error that involves generic precision.
Going off of the generic args I had to add to some of the tests/examples, I think I may still need to add some more f64 defaults to make this a non-breaking change.
I noticed a mix of how traits are added to generics, both using the : and where syntax, I tried to follow the code style as it was presented but let me know if anything should be adjusted.
[x] I added an entry to
CHANGES.md
if knowledge of this change could be valuable to users.Following up from my post almost a year ago in #59 , I finally got around to finishing this up!
This adds support for the generic
CoordFloat
trait to all structs provided by this crate. I've tested this locally in my OSS project and the only inconsistency I noticed was serializing with thejson!
macro fromserde_json
always resulted inf64
precision, but I wasn't sure if that is something that can be corrected in this crate. When returning the data and letting Actix serialize it with something likeHttpResponse::Ok().json(feature)
, it respected the intended precision.Notes for the maintainers to review:
f64
defaults to make this a non-breaking change.:
andwhere
syntax, I tried to follow the code style as it was presented but let me know if anything should be adjusted.Resolves #59