I'm being told that the lifetimes are unconstrained. I know the &'a Vec<usize> can only live as long as Indices itself, but I'm not sure how to signify this.
pub struct Indices {
indices: Vec<usize>,
}
pub struct IndicesIterator<'a> {
indices: &'a Vec<usize>,
}
impl<'a> IntoIterator for Indices {
type Item = usize;
type IntoIter = IndicesIterator<'a>;
fn into_iter(self) -> Self::IntoIter {
IndicesIterator {
indices: &self.indices,
}
}
}