From d65f952f600ad2d0828fd650829f6560404dca1c Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 26 Aug 2021 17:23:55 +0200 Subject: [PATCH] Consistently use into_iter() with collect() --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 0ef1b16..3b45c88 100644 --- a/src/main.rs +++ b/src/main.rs @@ -65,7 +65,7 @@ fn test_hashmaps() { println!("scores after doubling: {:?}", scores); // double scores of immutable hashmap (rebuild it) - let collect_scores: HashMap<_, _> = collect_scores.iter() + let collect_scores: HashMap<_, _> = collect_scores.into_iter() .map(|(k, v)| (k, 2 * v)) .collect(); println!("collect_scores after rebuilding with doubling: {:?}", collect_scores); -- 2.39.5