diff --git a/src/compiler/pitfalls/lazy-iterators.md b/src/compiler/pitfalls/lazy-iterators.md index 5d51d2e0..5f0f4a3c 100644 --- a/src/compiler/pitfalls/lazy-iterators.md +++ b/src/compiler/pitfalls/lazy-iterators.md @@ -113,7 +113,7 @@ let resolvers: HashMap<_, _> = accounts ```rust let resolvers = account.into_iter().fold(HashMap::new(), |mut resolvers, a|{ - resolvers.entry(a.id).or_insert(Vec::new).push(a); + resolvers.entry(a.id).or_insert(Vec::new()).push(a); resolvers }); ```