From ad4e62b52f6002e3af5b93bcee985505170b4591 Mon Sep 17 00:00:00 2001 From: sunface Date: Thu, 3 Mar 2022 08:40:54 +0800 Subject: [PATCH] fix typos --- src/basic/variable.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/variable.md b/src/basic/variable.md index e19ab117..a5f19a63 100644 --- a/src/basic/variable.md +++ b/src/basic/variable.md @@ -154,7 +154,7 @@ const MAX_POINTS: u32 = 100_000; >在实际使用中,最好将程序中用到的硬编码值都声明为常量,对于代码后续的维护有莫大的帮助。如果将来需要更改硬编码的值,你也只需要在代码中更改一处即可。 -### 变量遮蔽(shadowing) +### 变量遮蔽(shadowing) Rust 允许声明相同的变量名,在后面声明的变量会遮蔽掉前面声明的,如下所示: