From 5201fb9cf7cd2017970d85b77ee572e9d2e8ae1b Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 17 Feb 2025 19:52:36 +0200 Subject: [PATCH] apply limits to index files --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index 1e86c29..d640313 100644 --- a/src/main.rs +++ b/src/main.rs @@ -113,6 +113,10 @@ fn crawl(argument: &Argument, output: &Output) -> Result<(), Box> { let mut total = 0; for file in files { + if argument.limit.is_some_and(|limit| total >= limit) { + break; + } + let name = file.file_name().into_string().unwrap(); if &name == index_argument {