mirror of https://github.com/sunface/rust-course
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
unknown
b5216178fd
|
3 years ago | |
---|---|---|
.. | ||
README.md | 3 years ago | |
variables1.rs | 3 years ago | |
variables2.rs | 3 years ago | |
variables3.rs | 3 years ago | |
variables4.rs | 3 years ago | |
variables5.rs | 3 years ago | |
variables6.rs | 3 years ago |
README.md
变量(Variables)
在 Rust,变量默认是不可变的. 不可变意味着当一个值被绑定到某个名字上,你就不能再对这个值做出更改。 当然,你可以通过在变量名前添加 mut 来使它们变得可变。