Apply clippy::needless_borrowed_reference

This commit is contained in:
Eric Huss 2023-05-13 09:46:30 -07:00
parent 54df8234ed
commit 0ef3bb1cc6
1 changed files with 1 additions and 1 deletions

View File

@ -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);