From 601af83f2c779fe1ccca403a40f28f6108f47c4b Mon Sep 17 00:00:00 2001 From: aiongg Date: Thu, 22 Oct 2026 01:22:13 +0000 Subject: [PATCH] Integration: #2416 collapse the nested vertical-align if (clippy::collapsible_if) --- crates/formats/src/html.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/formats/src/html.rs b/crates/formats/src/html.rs index 4c68f6e65..a78c51d35 100644 --- a/crates/formats/src/html.rs +++ b/crates/formats/src/html.rs @@ -1266,14 +1266,14 @@ impl<'r> Builder<'r> { }); if let Some(st) = attr(attrs, "style") { for decl in st.split(';') { - if let Some((k, v)) = decl.split_once(':') { - if k.trim().eq_ignore_ascii_case("vertical-align") { - match v.trim().to_ascii_lowercase().as_str() { - "top" => valign = Some(VAlign::Top), - "middle" | "center" => valign = Some(VAlign::Center), - "bottom" => valign = Some(VAlign::Bottom), - _ => {} - } + if let Some((k, v)) = decl.split_once(':') + && k.trim().eq_ignore_ascii_case("vertical-align") + { + match v.trim().to_ascii_lowercase().as_str() { + "top" => valign = Some(VAlign::Top), + "middle" | "center" => valign = Some(VAlign::Center), + "bottom" => valign = Some(VAlign::Bottom), + _ => {} } } }