9012 shaares
209 private links
209 private links
Solution : box
the iterator and give the proper lifetime in signature function :
pub fn values<'a>(&'a self) -> Box<Iterator<Item = &i32> + 'a> {
// ...
}
Solution : box
the iterator and give the proper lifetime in signature function :
pub fn values<'a>(&'a self) -> Box<Iterator<Item = &i32> + 'a> {
// ...
}