vector/slicing - improve the phrasing

This commit is contained in:
mckzm
2024-06-15 13:40:17 +09:00
committed by GitHub
parent fd0c2c50c1
commit a637487fad

View File

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