# must fail: codecs_upper_prefix # an element beginning WAI is read as classical (codecs::is_wai_element) diff --git a/wai/wai-rs/src/http_binding/codecs.rs b/wai/wai-rs/src/http_binding/codecs.rs index 530ae822..cdc19410 100644 --- a/wai/wai-rs/src/http_binding/codecs.rs +++ b/wai/wai-rs/src/http_binding/codecs.rs @@ -156,7 +156,7 @@ pub fn parse_element(s: &str) -> Result { /// any ASCII case. Such an element that is not a well-formed `wai1.` or `wai2.` element /// is malformed, never classical. fn is_wai_element(e: &str) -> bool { - e.as_bytes().get(..3).is_some_and(|b| b.eq_ignore_ascii_case(b"wai")) + e.as_bytes().get(..3) == Some(&b"wai"[..]) } /// Parse a `codecs` value: one entry per `,`-separated element, `None` for a