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 a lines iterator method on LineString. #160

Merged
merged 4 commits into from
Sep 10, 2017
Merged

Add a lines iterator method on LineString. #160

merged 4 commits into from
Sep 10, 2017

Conversation

frewsxcv
Copy link
Member

No description provided.

/// );
/// assert!(lines.next().is_none());
/// ```
pub fn lines<'a>(&'a self) -> Box<Iterator<Item = Line<T>> + 'a> {
Copy link
Member Author

Choose a reason for hiding this comment

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

we can get rid of this Box once we can do -> impl Iterator<...> in stable rust

Copy link
Member

@urschrei urschrei left a comment

Choose a reason for hiding this comment

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

👍👍👍 Will amend #159

@frewsxcv
Copy link
Member Author

Actually one sec, gonna incorporate this a bunch of places

We have a bunch of tests that have invalid LineStrings with <2 points.
So we'll return an empty iterator to make them pass.
@frewsxcv
Copy link
Member Author

frewsxcv commented Sep 10, 2017

One test failure:

thread 'algorithm::contains::test::polygon_with_point_on_boundary_test' panicked at 'assertion failed: !poly.contains(&p(2., 1.))', src/algorithm/contains.rs:289:8

hmmmmmm

@frewsxcv
Copy link
Member Author

bors r+

bors bot added a commit that referenced this pull request Sep 10, 2017
160: Add a `lines` iterator method on `LineString`. r=frewsxcv a=frewsxcv
@bors
Copy link
Contributor

bors bot commented Sep 10, 2017

Build succeeded

@bors bors bot merged commit 0b0d4eb into master Sep 10, 2017
@frewsxcv frewsxcv deleted the frewsxcv-lines branch September 10, 2017 15:53
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