diff options
Diffstat (limited to 'components/script/stylesheet_loader.rs')
-rw-r--r-- | components/script/stylesheet_loader.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/stylesheet_loader.rs b/components/script/stylesheet_loader.rs index 079566d1971..006bc10b8df 100644 --- a/components/script/stylesheet_loader.rs +++ b/components/script/stylesheet_loader.rs @@ -128,7 +128,7 @@ impl FetchResponseListener for StylesheetContext { Some(meta) => meta, None => return, }; - let is_css = metadata.content_type.map_or(false, |ct| { + let is_css = metadata.content_type.is_some_and(|ct| { let mime: Mime = ct.into_inner().into(); mime.type_() == mime::TEXT && mime.subtype() == mime::CSS }); @@ -202,7 +202,7 @@ impl FetchResponseListener for StylesheetContext { // FIXME: Revisit once consensus is reached at: // https://github.com/whatwg/html/issues/1142 - successful = metadata.status.map_or(false, |(code, _)| code == 200); + successful = metadata.status.is_some_and(|(code, _)| code == 200); } let owner = elem |