From 91fc9e3118f4af603c9911698cc2a234725cb032 Mon Sep 17 00:00:00 2001 From: Taylor Yu Date: Sun, 6 Jun 2021 17:36:44 -0500 Subject: [PATCH 1/2] fix(iterators5): derive Clone, Copy To allow more flexibility in solutions, derive `Clone` and `Copy` for `Progress`. --- exercises/standard_library_types/iterators5.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/standard_library_types/iterators5.rs b/exercises/standard_library_types/iterators5.rs index d8d4453..765028a 100644 --- a/exercises/standard_library_types/iterators5.rs +++ b/exercises/standard_library_types/iterators5.rs @@ -15,7 +15,7 @@ use std::collections::HashMap; -#[derive(PartialEq, Eq)] +#[derive(Clone, Copy, PartialEq, Eq)] enum Progress { None, Some, From 4e079fdd0829ab271508c773aa814b21d6cff32b Mon Sep 17 00:00:00 2001 From: Taylor Yu Date: Sun, 6 Jun 2021 17:39:13 -0500 Subject: [PATCH 2/2] chore(iterators5): conciseness hint --- info.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/info.toml b/info.toml index 8c8f7c1..562fe42 100644 --- a/info.toml +++ b/info.toml @@ -788,7 +788,10 @@ test count_iterator. The collection variable in count_collection_iterator is a slice of HashMaps. It needs to be converted into an iterator in order to use the iterator methods. -The fold method can be useful in the count_collection_iterator function.""" +The fold method can be useful in the count_collection_iterator function. + +For a further challenge, consult the documentation for Iterator to find +a different method that could make your code more compact than using fold.""" # THREADS