100-exercises-to-learn-rust
100-exercises-to-learn-rust copied to clipboard
06/06_lifetimes: Hiding a lifetime that's elided elsewhere is confusing
Got compiler warning about hiding elided lifetime at line 34: https://github.com/mainmatter/100-exercises-to-learn-rust/blob/d347d1f72ee77b96b2d51f0405292fd0590e8162/exercises/06_ticket_management/06_lifetimes/src/lib.rs#L34-L37
Suggested fix:
pub fn iter(&self) -> std::slice::Iter<'_, Ticket> {
self.tickets.iter()
}