Relax constraints on `Coord` and associated structures
- [x] I agree to follow the project's code of conduct.
- [ ] I added an entry to
CHANGES.mdif knowledge of this change could be valuable to users.
Hello! I am currently working on a rendering library for leptos, which uses geo. I would like to make interactive svgs in the dom, but that requires that some of the inner types of several geo-types structs should have their constraints relaxed.
This change does not affect current implementations in other crates, as these changes only allow types that are not CoordNum (but potentially implement Add or PartialEq, etc.) to access crate implementations.
The reasoning for keeping generics unconstrained on structs is identified in the Rust API Guide. This change is part of a series of processes to relax bounds as the geo ecosystem is extended.
-
Coordno longer has an impl constraint ofCoordNumfor its inner values -
Rect<T>,LineString<T>,Line<T>,PointsIter<T>generic constraints have been relaxed. - Certain implementations have been relaxed for
Tacross types to allow values to access identical functionality written bygeo
Relates to #1169 and #1157. Relates to https://github.com/georust/geo-svg/issues/13 Thank you for your consideration!
I think I understand how this change makes the code more mathematically "pure", but are you actually running into a problem with the current implementation? Can you succinctly describe that problem or point to some code which fails to compile?
I think I understand how this change makes the code more mathematically "pure", but are you actually running into a problem with the current implementation? Can you succinctly describe that problem or point to some code which fails to compile?
Absolutely, will create an issue describing several examples of this. Thank you for considering my PR!
Ran out of time and forgot about this