From 607cd115d94df895f917c33f18ac13de0fe8680a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E5=A8=98?= <30471441@qq.com> Date: Tue, 14 Mar 2023 10:39:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0ch03-01-variables-and-mutabil?= =?UTF-8?q?ity.md=E5=88=B021a2ed14f4480dab62438dcc1130291bebc65379?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 由于英文是错别字修改,所以中文这里无需变更 --- src/ch03-01-variables-and-mutability.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch03-01-variables-and-mutability.md b/src/ch03-01-variables-and-mutability.md index 9224764..4225d1e 100644 --- a/src/ch03-01-variables-and-mutability.md +++ b/src/ch03-01-variables-and-mutability.md @@ -2,7 +2,7 @@ > [ch03-01-variables-and-mutability.md](https://github.com/rust-lang/book/blob/main/src/ch03-01-variables-and-mutability.md) > -> commit d0acb2595c891de97a133d06635c50ab449dd65c +> commit 21a2ed14f4480dab62438dcc1130291bebc65379 正如第二章中[“使用变量储存值”][storing-values-with-variables] 部分提到的那样,变量默认是不可改变的(immutable)。这是 Rust 提供给你的众多优势之一,让你得以充分利用 Rust 提供的安全性和简单并发性来编写代码。不过,你仍然可以使用可变变量。让我们探讨一下 Rust 为何及如何鼓励你利用不可变性,以及何时你会选择不使用不可变性。