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` 表明该数组包含五个元素。
|
||||
|
||||
你还可以通过在放括号中指定初始值加分号再加元素个数的方式来创建一个每个元素都为相同值的数组:
|
||||
你还可以通过在方括号中指定初始值加分号再加元素个数的方式来创建一个每个元素都为相同值的数组:
|
||||
|
||||
```rust
|
||||
let a = [3; 5];
|
||||
|
Loading…
Reference in New Issue
Block a user