Comment by brcmthrowaway 5 hours ago How does Rust avoid this? 1 comment brcmthrowaway Reply trucks-refinish 5 hours ago In rust you cannot mutate anything that is being read basically. The borrow checker enforces this.So an iterator takes an immutable reference to the vector and mutation requires a mut ref, and you can't have both at the same time.
trucks-refinish 5 hours ago In rust you cannot mutate anything that is being read basically. The borrow checker enforces this.So an iterator takes an immutable reference to the vector and mutation requires a mut ref, and you can't have both at the same time.
In rust you cannot mutate anything that is being read basically. The borrow checker enforces this.
So an iterator takes an immutable reference to the vector and mutation requires a mut ref, and you can't have both at the same time.