From 9f5194abcdbb4c80b3373091904205d4b3617f93 Mon Sep 17 00:00:00 2001 From: GSLun <41274549+GSlun@users.noreply.github.com> Date: Sat, 26 Nov 2022 12:15:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9C=89=E4=B8=AA=E5=B0=8F?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/compiler/pitfalls/lazy-iterators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }); ```