From f1eb77192727ddd2f25f9d8c9c9d1c4c4bda5f21 Mon Sep 17 00:00:00 2001 From: asthetik Date: Sun, 29 Oct 2023 15:35:19 +0800 Subject: [PATCH] Eliminate compiler warnings --- src/advance/functional-programing/iterator.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/advance/functional-programing/iterator.md b/src/advance/functional-programing/iterator.md index 00ca73cc..8772541f 100644 --- a/src/advance/functional-programing/iterator.md +++ b/src/advance/functional-programing/iterator.md @@ -435,7 +435,7 @@ let val = v.iter() // 每两个元素剔除一个 // [1, 3, 5] .filter(|&(idx, _)| idx % 2 == 0) - .map(|(idx, val)| val) + .map(|(_, val)| val) // 累加 1+3+5 = 9 .fold(0u64, |sum, acm| sum + acm);