diff -r a5eaeefa4ab3 -r 6633961698ad rust/integral-geometry/src/lib.rs --- a/rust/integral-geometry/src/lib.rs Thu Dec 19 12:43:38 2024 +0100 +++ b/rust/integral-geometry/src/lib.rs Thu Dec 19 14:18:55 2024 +0100 @@ -107,7 +107,7 @@ #[inline] pub fn from_fppoint(p: &FPPoint) -> Self { - Self::new(p.x().round(), p.y().round()) + Self::new(p.x().round() as i32, p.y().round() as i32) } } @@ -614,11 +614,11 @@ self.vertices.insert(edge_index + 1, vertex); } - pub fn iter<'a>(&'a self) -> impl Iterator + 'a { + pub fn iter(&self) -> impl Iterator { (&self.vertices[..self.edges_count()]).iter() } - pub fn iter_mut<'a>(&'a mut self) -> impl Iterator + 'a { + pub fn iter_mut(&mut self) -> impl Iterator { let edges_count = self.edges_count(); let start = self.vertices.as_mut_ptr(); let end = unsafe { start.add(edges_count) };