use keyduplicates; fn main() { let keys = [1, 2, 1, 1]; let result = keyduplicates_count(keys); if len(result) == 0 { println!("invalid"); return; } let mut i = 0; while i < len(result) { println!(at(result, i)); i += 1; } }