mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-02-23 04:32:16 +08:00
fixed typo
fixed typo
This commit is contained in:
parent
fc425b84f0
commit
f5045a2147
@ -246,7 +246,7 @@ let a: [i32; 5] = [1, 2, 3, 4, 5];
|
|||||||
|
|
||||||
这里,`i32` 是每个元素的类型。分号之后,数字 `5` 表明该数组包含五个元素。
|
这里,`i32` 是每个元素的类型。分号之后,数字 `5` 表明该数组包含五个元素。
|
||||||
|
|
||||||
你还可以通过在放括号中指定初始值加分号再加元素个数的方式来创建一个每个元素都为相同值的数组:
|
你还可以通过在方括号中指定初始值加分号再加元素个数的方式来创建一个每个元素都为相同值的数组:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
let a = [3; 5];
|
let a = [3; 5];
|
||||||
@ -324,4 +324,4 @@ ch02-00-guessing-game-tutorial.html#comparing-the-guess-to-the-secret-number
|
|||||||
[vectors]: ch08-01-vectors.html
|
[vectors]: ch08-01-vectors.html
|
||||||
[unrecoverable-errors-with-panic]: ch09-01-unrecoverable-errors-with-panic.html
|
[unrecoverable-errors-with-panic]: ch09-01-unrecoverable-errors-with-panic.html
|
||||||
[wrapping]: https://doc.rust-lang.org/std/num/struct.Wrapping.html
|
[wrapping]: https://doc.rust-lang.org/std/num/struct.Wrapping.html
|
||||||
[appendix_b]: appendix-02-operators.md
|
[appendix_b]: appendix-02-operators.md
|
||||||
|
Loading…
Reference in New Issue
Block a user