mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
changed match
to 'matches!' (#31850)
This commit is contained in:
parent
9a76dd9325
commit
bd39e03eeb
29 changed files with 185 additions and 229 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue