On Fri, Dec 6, 2013 at 10:50 AM, Bill Myers <[email protected]> wrote: > Maybe the language should be changed to allow Iterator to be changed to have > a signature like this: > pub trait Iterator<A> { > fn next<'a>(&'a mut self) -> Option<'a A>; > } > > Then you could return the &mut by reborrowing and would be able to advance > the iterator without issue afterwards.
It can't be defined that way without becoming much less useful for more common cases. _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
