From bd39e03eeb3d369e8189135326c733bbe5a3bb10 Mon Sep 17 00:00:00 2001 From: Aarya Khandelwal <119049564+Aaryakhandelwal@users.noreply.github.com> Date: Mon, 25 Mar 2024 16:58:12 +0530 Subject: changed `match` to 'matches!' (#31850) --- components/script/dom/request.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'components/script/dom/request.rs') diff --git a/components/script/dom/request.rs b/components/script/dom/request.rs index 5ae169dbfff..bdbc211552f 100644 --- a/components/script/dom/request.rs +++ b/components/script/dom/request.rs @@ -493,12 +493,10 @@ fn is_method(m: &ByteString) -> bool { // https://fetch.spec.whatwg.org/#forbidden-method fn is_forbidden_method(m: &ByteString) -> bool { - match m.to_lower().as_str() { - Some("connect") => true, - Some("trace") => true, - Some("track") => true, - _ => false, - } + matches!( + m.to_lower().as_str(), + Some("connect") | Some("trace") | Some("track") + ) } // https://fetch.spec.whatwg.org/#cors-safelisted-method -- cgit v1.2.3