diff --git a/Cargo.lock b/Cargo.lock index 5acadef..a47fe9c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -275,19 +275,20 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" +checksum = "ad445822218ce64be7a341abfb0b1ea43b5c23aa83902542a4542e78309d8e5e" dependencies = [ "async-stream-impl", "futures-core", + "pin-project-lite", ] [[package]] name = "async-stream-impl" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" +checksum = "e4655ae1a7b0cdf149156f780c5bf3f1352bc53cbd9e0a361a7ef7b22947e965" dependencies = [ "proc-macro2", "quote", diff --git a/lychee-lib/Cargo.toml b/lychee-lib/Cargo.toml index 56938b9..53091a2 100644 --- a/lychee-lib/Cargo.toml +++ b/lychee-lib/Cargo.toml @@ -41,7 +41,7 @@ url = { version = "2.3.0", features = ["serde"] } log = "0.4.17" path-clean = "0.1.0" percent-encoding = "2.1.0" -async-stream = "0.3.3" +async-stream = "0.3.4" jwalk = "0.8.1" cached = "0.42.0" once_cell = "1.17.1" diff --git a/lychee-lib/src/types/input.rs b/lychee-lib/src/types/input.rs index ddea47e..c6a4e99 100644 --- a/lychee-lib/src/types/input.rs +++ b/lychee-lib/src/types/input.rs @@ -204,10 +204,7 @@ impl Input { for entry in WalkDir::new(path).skip_hidden(true) .process_read_dir(move |_, _, _, children| { children.retain(|child| { - let entry = match child.as_ref() { - Ok(x) => x, - Err(_) => return true, - }; + let Ok(entry) = child.as_ref() else { return true }; if self.is_excluded_path(&entry.path()) { return false; @@ -225,7 +222,7 @@ impl Input { if !file_type.is_file() { return false; } - return valid_extension(&entry.path()); + valid_extension(&entry.path()) }); }) { let entry = entry?; @@ -237,7 +234,7 @@ impl Input { } } else { if self.is_excluded_path(path) { - return (); + return; } let content = Self::path_content(path).await; match content {