From 663b6848fa5d17ab879fedcfad3cdc98555486e5 Mon Sep 17 00:00:00 2001 From: x1a0t <405028157@qq.com> Date: Mon, 20 Feb 2023 21:52:28 +0800 Subject: [PATCH] chore: update if let example to include pattern binding --- src/basic/match-pattern/match-if-let.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/basic/match-pattern/match-if-let.md b/src/basic/match-pattern/match-if-let.md index 3f30909a..71b6bdcf 100644 --- a/src/basic/match-pattern/match-if-let.md +++ b/src/basic/match-pattern/match-if-let.md @@ -274,8 +274,8 @@ match some_u8_value { 俗话说“杀鸡焉用牛刀”,我们完全可以用 `if let` 的方式来实现: ```rust -if let Some(3) = v { - println!("three"); +if let Some(num) = v { + println!("{}", num); } ```