Comment

Comment by trucks-refinish

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.

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton