Closed gibbz00 closed 10 months ago
Right now Polygon
is guaranteed to be close, and by publicizing the fields we lose that guarantee. I'd rather explore other options to increase ergonomics and keep our guarantee before resorting to this.
Right now
Polygon
is guaranteed to be close, and by publicizing the fields we lose that guarantee. I'd rather explore other options to increase ergonomics and keep our guarantee before resorting to this.
Gotcha. Got an alternative solution to work. Sending in a new PR soon.
Polygon::{exterior,interiors}_mut()
are for example insufficient when using closures that return aResult
.I do realize that this might cause issues with polygons that aren't closed if instantiation is created without the proper
new
constructor, so there's probably a better way to go about this. I simply chose the method that resulted in the least amount of changes possible.Example:
CHANGES.md
if knowledge of this change could be valuable to users.