add proper divisors into_iter

This commit is contained in:
timeshifter
2025-03-14 18:56:39 +01:00
parent ce4565938c
commit 8fe8e7efb7
+5 -1
View File
@@ -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<usize, Vec<usize>> {
self.map.into_iter()
}
}
#[cfg(test)]