diff --git a/lib/proper_divisors/src/lib.rs b/lib/proper_divisors/src/lib.rs index ee4655f..d9efb6f 100644 --- a/lib/proper_divisors/src/lib.rs +++ b/lib/proper_divisors/src/lib.rs @@ -1,4 +1,4 @@ -use std::collections::HashMap; +use std::collections::{HashMap, hash_map}; #[derive(Debug)] pub struct ProperDivisors { @@ -43,6 +43,10 @@ impl ProperDivisors { pub fn get(&self, number: usize) -> &[usize] { self.map.get(&number).unwrap() } + + pub fn into_iter(self) -> hash_map::IntoIter> { + self.map.into_iter() + } } #[cfg(test)]