Skip to content

Commit

Permalink
Remove clippy warnings. #630
Browse files Browse the repository at this point in the history
  • Loading branch information
martinfrances107 committed Feb 21, 2021
1 parent e3096c0 commit 6aec3e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions geo-types/src/line_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,15 @@ impl<T: CoordNum> LineString<T> {
/// );
/// assert!(lines.next().is_none());
/// ```
pub fn lines<'a>(&'a self) -> impl ExactSizeIterator + Iterator<Item = Line<T>> + 'a {
pub fn lines(&'_ self) -> impl ExactSizeIterator + Iterator<Item = Line<T>> + '_ {
self.0.windows(2).map(|w| {
// slice::windows(N) is guaranteed to yield a slice with exactly N elements
unsafe { Line::new(*w.get_unchecked(0), *w.get_unchecked(1)) }
})
}

/// An iterator which yields the coordinates of a `LineString` as `Triangle`s
pub fn triangles<'a>(&'a self) -> impl ExactSizeIterator + Iterator<Item = Triangle<T>> + 'a {
pub fn triangles(&'_ self) -> impl ExactSizeIterator + Iterator<Item = Triangle<T>> + '_ {
self.0.windows(3).map(|w| {
// slice::windows(N) is guaranteed to yield a slice with exactly N elements
unsafe {
Expand Down

0 comments on commit 6aec3e0

Please sign in to comment.