diff --git a/src/book/book.rs b/src/book/book.rs index 647a8042..3531de38 100644 --- a/src/book/book.rs +++ b/src/book/book.rs @@ -317,7 +317,7 @@ impl<'a> Iterator for BookItems<'a> { fn next(&mut self) -> Option { let item = self.items.pop_front(); - if let Some(&BookItem::Chapter(ref ch)) = item { + if let Some(BookItem::Chapter(ch)) = item { // if we wanted a breadth-first iterator we'd `extend()` here for sub_item in ch.sub_items.iter().rev() { self.items.push_front(sub_item);