changeset 14155 | 8f82d87d223f |
parent 14152 | 5acfdf49742d |
child 14175 | 76a52e8149e3 |
--- a/rust/integral-geometry/src/lib.rs Wed Nov 07 15:59:51 2018 +0100 +++ b/rust/integral-geometry/src/lib.rs Wed Nov 07 18:27:24 2018 +0300 @@ -505,8 +505,9 @@ } pub fn iter_mut<'a>(&'a mut self) -> impl Iterator<Item = &mut Point> + 'a { + let edges_count = self.edges_count(); let start = self.vertices.as_mut_ptr(); - let end = unsafe { start.add(self.vertices.len()) }; + let end = unsafe { start.add(edges_count) }; PolygonPointsIteratorMut { source: self, start,