Skip to content

Commit fbc875d

Browse files
committed
Fix clippy::only-used-in-recursion
1 parent e6b1413 commit fbc875d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/book/summary.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ impl<'a> SummaryParser<'a> {
248248

249249
let mut files = HashSet::new();
250250
for part in [&prefix_chapters, &numbered_chapters, &suffix_chapters] {
251-
self.check_for_duplicates(&part, &mut files)?;
251+
Self::check_for_duplicates(&part, &mut files)?;
252252
}
253253

254254
Ok(Summary {
@@ -261,7 +261,6 @@ impl<'a> SummaryParser<'a> {
261261

262262
/// Recursively check for duplicate files in the summary items.
263263
fn check_for_duplicates<'b>(
264-
&self,
265264
items: &'b [SummaryItem],
266265
files: &mut HashSet<&'b PathBuf>,
267266
) -> Result<()> {
@@ -276,7 +275,7 @@ impl<'a> SummaryParser<'a> {
276275
}
277276
}
278277
// Recursively check nested items
279-
self.check_for_duplicates(&link.nested_items, files)?;
278+
Self::check_for_duplicates(&link.nested_items, files)?;
280279
}
281280
}
282281
Ok(())

0 commit comments

Comments
 (0)