From 5ea646a332bff01b719b9c1685ab41c53f25327d Mon Sep 17 00:00:00 2001 From: Valerio Date: Sat, 4 Apr 2026 15:28:59 +0200 Subject: [PATCH] fix: resolve clippy warnings from #14 (collapsible_if, manual_inspect) CI runs Rust 1.94 which flags these. Collapsed nested if-let in cell_has_block_content() and replaced .map()+return with .inspect() in table_to_md(). Co-Authored-By: Claude Opus 4.6 (1M context) --- crates/webclaw-core/src/markdown.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/crates/webclaw-core/src/markdown.rs b/crates/webclaw-core/src/markdown.rs index 7908185..1a61586 100644 --- a/crates/webclaw-core/src/markdown.rs +++ b/crates/webclaw-core/src/markdown.rs @@ -526,10 +526,10 @@ fn cell_has_block_content(cell: ElementRef<'_>) -> bool { "aside", ]; for desc in cell.descendants() { - if let Some(el) = ElementRef::wrap(desc) { - if BLOCK_TAGS.contains(&el.value().name()) { - return true; - } + if let Some(el) = ElementRef::wrap(desc) + && BLOCK_TAGS.contains(&el.value().name()) + { + return true; } } false @@ -560,14 +560,13 @@ fn table_to_md( !exclude.contains(&c.id()) && (c.value().name() == "th" || c.value().name() == "td") }) - .map(|c| { + .inspect(|&c| { if c.value().name() == "th" { has_header = true; } if !is_layout && cell_has_block_content(c) { is_layout = true; } - c }) .collect();