mirror of
https://github.com/0xMassi/webclaw.git
synced 2026-04-25 00:06:21 +02:00
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) <noreply@anthropic.com>
This commit is contained in:
parent
3cf9dbaf2a
commit
5ea646a332
1 changed files with 5 additions and 6 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue