docs: update comments

This commit is contained in:
CarrotDLaw 2024-05-10 18:04:11 +08:00
parent 665b61bfa2
commit 167a2928a5

View File

@ -98,7 +98,7 @@
// 在 Rust 中,指定長度时([i32; 5])爲陣列,不指定長度時(&[i32])爲切片
// 由於 Rust 的陣列被設計為在編譯期確定長度,因此只能使用常數來指定長度
// Vector 是 Rust 一般情況下使用動態陣列的類型
// 為了方便實現擴容 extend() 方法,以下將 Vec 看作陣列array
// 為了方便實現擴容 extend() 方法,以下將 vector 看作陣列array
let nums: Vec<i32> = vec![1, 3, 2, 5, 4];
```