Skip to content
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 missing iter, iter_mut, and IntoIter<&'a mut, T> methods #539

Merged
merged 4 commits into from
Nov 14, 2020
Merged

Conversation

michaelkirk
Copy link
Member

This is just a small quality of life thing - you can see its application in the final "apply" commit.

GeometryCollection had the full suite of iterator methods, but although MultiLineString, MultiPolygon, and MultiPoint had the consuming IntoIter<T> trait, they did not have the conventional iter(), iter_mut() methods nor the non-consuming IntoIter methods.

@@ -81,3 +81,116 @@ impl<T: CoordinateType> IntoIterator for MultiLineString<T> {
self.0.into_iter()
}
}

impl<'a, T: CoordinateType> IntoIterator for &'a MultiLineString<T> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: the implementation and tests were more or less copy+pasted across MultiLineString, MultiPolygon, and MultiPoint.

@frewsxcv
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Nov 14, 2020

Build succeeded:

@bors bors bot merged commit 67fb4c4 into master Nov 14, 2020
@michaelkirk michaelkirk deleted the mkirk/iter branch December 2, 2020 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants