From b3735873b0c0c7c196290ac3f378104ae36cbf74 Mon Sep 17 00:00:00 2001 From: Leynos Date: Sun, 15 Jun 2025 03:19:41 +0100 Subject: [PATCH] Simplify strong detection with iterator --- src/html.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/html.rs b/src/html.rs index 6bd4c954..785348c8 100644 --- a/src/html.rs +++ b/src/html.rs @@ -99,12 +99,7 @@ fn contains_strong(handle: &Handle) -> bool { return true; } } - for child in handle.children.borrow().iter() { - if contains_strong(child) { - return true; - } - } - false + handle.children.borrow().iter().any(contains_strong) } /// Converts a `` DOM node into Markdown table lines and calls