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.