Update en/src/collections/vector.md

This commit is contained in:
Sunface
2024-06-27 17:02:47 +08:00
committed by GitHub
parent e7cfb63ac8
commit cd1e8a242e

View File

@ -130,7 +130,7 @@ fn main() {
assert_eq!(slice1, slice2); assert_eq!(slice1, slice2);
// A slice can also be mutable, in which // A slice can also be mutable, in which
// case mutating it will mutate its underlying Vec // case mutating it will mutate its underlying Vec.
// Note: slice and &Vec are different // Note: slice and &Vec are different
let vec_ref: &mut Vec<i32> = &mut v; let vec_ref: &mut Vec<i32> = &mut v;
(*vec_ref).push(4); (*vec_ref).push(4);