News for hackers. Stuff that matters.
Re:Getting Past C by Manishearth on Wednesday January 04, 2017 @12:20AM (#13315867)
> have to take ownership of the whole data type,

This isn't the case. They only need to borrow it. A borrowed value isn't allowed to move (the borrow itself can be copied around and shared within the scope of the borrow), so that works out.

Most Rust iterators only borrow the container or iterator they operate on. It's only explicitly moving iterators like .into_iter() (which extracts elements by-move) that don't.

There are no comments on this comment yet.