Skip to content

Commit a3ea37b

Browse files
authored
Merge pull request #771 from tlyu/iterators5-trait-tweak
fix(iterators5): derive Clone, Copy
2 parents ec63cad + 4e079fd commit a3ea37b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

exercises/standard_library_types/iterators5.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
use std::collections::HashMap;
1717

18-
#[derive(PartialEq, Eq)]
18+
#[derive(Clone, Copy, PartialEq, Eq)]
1919
enum Progress {
2020
None,
2121
Some,

info.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,10 @@ test count_iterator.
798798
The collection variable in count_collection_iterator is a slice of HashMaps. It
799799
needs to be converted into an iterator in order to use the iterator methods.
800800
801-
The fold method can be useful in the count_collection_iterator function."""
801+
The fold method can be useful in the count_collection_iterator function.
802+
803+
For a further challenge, consult the documentation for Iterator to find
804+
a different method that could make your code more compact than using fold."""
802805

803806
# THREADS
804807

0 commit comments

Comments
 (0)