From 92bd0617d17edf386a38dc7484c1f7709b8b33a8 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Tue, 28 Oct 2025 21:27:30 +0100 Subject: [PATCH] feat: add into_iter for population --- codes/eoa_lib/src/replacement.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/codes/eoa_lib/src/replacement.rs b/codes/eoa_lib/src/replacement.rs index 2061e0a12ae8e51926d62e3044dc8129ac534340..9cc6c5d4f00fc7fc182000594fb30d0b3681b9e5 100644 --- a/codes/eoa_lib/src/replacement.rs +++ b/codes/eoa_lib/src/replacement.rs @@ -51,7 +51,11 @@ impl Population { ) } - pub fn iter(&mut self) -> impl Iterator { + pub fn into_iter(self) -> impl Iterator { + self.population.into_iter() + } + + pub fn iter(&self) -> impl Iterator { self.population.iter() }