Closed tmandry closed 1 week ago
Thanks for picking this up :)
@bsodmike: The link you shared is broken. Could you share the sample of code you provided?
nvm, I manually extracted it out of gist:
#![allow(warnings)]
fn main() {
let mut data = vec![1, 2, 3];
let mut i = indices(&data);
data.push(4);
i.next();
}
fn indices<T>(
slice: &[T],
) -> impl Iterator<Item = usize> {
0 .. slice.len()
}
nvm, I manually extracted it out of gist:
#![allow(warnings)] fn main() { let mut data = vec![1, 2, 3]; let mut i = indices(&data); data.push(4); i.next(); } fn indices<T>( slice: &[T], ) -> impl Iterator<Item = usize> { 0 .. slice.len() }
Sorry. The Rust playground is having a day off. Excellent!
Originally posted by @bsodmike in #125836