Apply clippy::needless_borrowed_reference
This commit is contained in:
parent
54df8234ed
commit
0ef3bb1cc6
|
@ -317,7 +317,7 @@ impl<'a> Iterator for BookItems<'a> {
|
|||
fn next(&mut self) -> Option<Self::Item> {
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue