-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CoordsIter::exterior_coords_iter
#594
Conversation
Just merged in master, so this is ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
bors r+
@@ -313,6 +411,31 @@ impl<'a, T: CoordinateType + 'a> CoordsIter<'a> for Geometry<T> { | |||
Geometry::Triangle(g) => g.coords_count(), | |||
} | |||
} | |||
|
|||
fn exterior_coords_iter(&'a self) -> Self::ExteriorIter { | |||
match self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes I wonder if we should adopt https://docs.rs/enum_dispatch/0.3.4/enum_dispatch/
{ | ||
type Item = Iter2::Iter; | ||
|
||
fn next(&mut self) -> Option<Self::Item> { | ||
self.0.next().map(|g| g.coords_iter()) | ||
} | ||
|
||
fn size_hint(&self) -> (usize, Option<usize>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀 good catch
Build succeeded: |
CHANGES.md
if knowledge of this change could be valuable to users.This will get incorporated into #592
Fixes #542
Based on and blocked by #593