miniblog.
← Back to all posts
Wilfred Hughes
Apr 24, 2021 at 20:45
TIL that &mut [T] in Rust means that you can modify the items in a slice, but you can't change its size. It's surprisingly handy: I'd just been using &mut Vec<T> everywhere previously.