From f08eda2758fb7e96cd9633793bc54f75642b109f Mon Sep 17 00:00:00 2001 From: Joscha Date: Wed, 16 Apr 2025 22:16:08 +0200 Subject: [PATCH] Satisfy clippy --- src/check.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/check.rs b/src/check.rs index c4f3387..01f3a59 100644 --- a/src/check.rs +++ b/src/check.rs @@ -58,10 +58,9 @@ pub fn is_valid_raw_text(tag_name: &str, text: &str) -> bool { // "[...] followed by characters that case-insensitively match the tag // name of the element [...]" // - // Note: Since we know that tag names are ascii-only, we can convert - // both to lowercase for a case-insensitive comparison without weird - // unicode shenanigans. - if potential_tag_name.to_ascii_lowercase() != tag_name.to_ascii_lowercase() { + // Note: Since we know that tag names are ascii-only, we can use an + // ASCII-based case insensitive comparison without unicode shenanigans. + if !potential_tag_name.eq_ignore_ascii_case(tag_name) { continue; }