From fc907780dd2b96f1c7f84dc7a174c93918c24c85 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Wed, 11 Sep 2024 14:26:40 +0000 Subject: [PATCH] chore: Fix clippy error --- crates/bpf-common/src/containers/layers.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/bpf-common/src/containers/layers.rs b/crates/bpf-common/src/containers/layers.rs index 6ceb8271..ba5adb06 100644 --- a/crates/bpf-common/src/containers/layers.rs +++ b/crates/bpf-common/src/containers/layers.rs @@ -298,12 +298,10 @@ fn find_subdirs>(parent_path: P) -> Vec { if parent_path.as_ref().is_dir() { if let Ok(entries) = fs::read_dir(parent_path) { - for entry in entries { - if let Ok(entry) = entry { - let path = entry.path(); - if path.is_dir() { - subdirectories.push(path); - } + for entry in entries.flatten() { + let path = entry.path(); + if path.is_dir() { + subdirectories.push(path); } } }