10931 shaares
  
  
389 private links
389 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> {
        // ...
}