mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-13 06:12:43 +00:00
Apply clippy::needless_borrowed_reference
This commit is contained in:
parent
54df8234ed
commit
0ef3bb1cc6
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue