Update chapter_3_2.md

This commit is contained in:
令狐一冲
2023-05-31 14:00:42 +08:00
committed by GitHub
parent 756be45f79
commit 27c6c704e0

View File

@@ -167,7 +167,7 @@ fn main() {
fn main() {
let a = [1, 2, 3, 4, 5]; //直接写数组的值
let b: [i32; 5] = [1, 2, 3, 4, 5]; //显示指定数组的类型和长度
let c: [i32; 5] = [3; 5]; //数组每个元素为同样的值等价于let a = [5, 5, 5, 5, 5];
let c: [i32; 5] = [3; 5]; //数组每个元素为同样的值等价于let a = [3, 3, 3, 3, 3];
}
```