From 0ef3bb1cc635c60a7acc8bc6222f732e60acd70f Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sat, 13 May 2023 09:46:30 -0700 Subject: [PATCH] Apply clippy::needless_borrowed_reference --- src/book/book.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);