From d8f171a99643e96f0199682c0d088970505e3cbb Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sat, 13 May 2023 09:50:32 -0700 Subject: [PATCH] Apply clippy::manual_while_let_some --- src/book/book.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/book/book.rs b/src/book/book.rs index 3531de38..96c70abc 100644 --- a/src/book/book.rs +++ b/src/book/book.rs @@ -39,9 +39,7 @@ fn create_missing(src_dir: &Path, summary: &Summary) -> Result<()> { .chain(summary.suffix_chapters.iter()) .collect(); - while !items.is_empty() { - let next = items.pop().expect("already checked"); - + while let Some(next) = items.pop() { if let SummaryItem::Link(ref link) = *next { if let Some(ref location) = link.location { let filename = src_dir.join(location);