Skip to content

Commit 1de61cf

Browse files
bors[bot]urschrei
andauthored
Merge #951
951: Return DoubleEndedIterator from points and points_mut r=lnicola a=urschrei Fixes #949 - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/main/CODE_OF_CONDUCT.md). - [x] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users. --- Co-authored-by: Stephan Hügel <shugel@tcd.ie> Co-authored-by: Stephan Hügel <urschrei@gmail.com>
2 parents 057a886 + d883900 commit 1de61cf

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

geo-types/CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## unreleased
44

5+
* Return `DoubleEndedIterator` from `LineString::points` and `LineString::points_mut`
6+
* <https://github.com/georust/geo/pull/951>
7+
58
## 0.7.8
69

710
* Rename `Coordinate` to `Coord`; add deprecated `Coordinate` that is an alias for `Coord`

geo-types/src/geometry/line_string.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,12 @@ impl<T: CoordNum> LineString<T> {
208208
}
209209

210210
/// Return an iterator yielding the members of a [`LineString`] as [`Coord`]s
211-
pub fn coords(&self) -> impl Iterator<Item = &Coord<T>> {
211+
pub fn coords(&self) -> impl DoubleEndedIterator<Item = &Coord<T>> {
212212
self.0.iter()
213213
}
214214

215215
/// Return an iterator yielding the coordinates of a [`LineString`] as mutable [`Coord`]s
216-
pub fn coords_mut(&mut self) -> impl Iterator<Item = &mut Coord<T>> {
216+
pub fn coords_mut(&mut self) -> impl DoubleEndedIterator<Item = &mut Coord<T>> {
217217
self.0.iter_mut()
218218
}
219219

0 commit comments

Comments
 (0)