diff options
-rw-r--r-- | components/style/stylesheets.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/components/style/stylesheets.rs b/components/style/stylesheets.rs index 00e9def4900..c65706b27ce 100644 --- a/components/style/stylesheets.rs +++ b/components/style/stylesheets.rs @@ -148,10 +148,7 @@ impl Stylesheet { /// /// Always true if no associated MediaQueryList exists. pub fn is_effective_for_device(&self, device: &Device) -> bool { - match self.media { - Some(ref media) => media.evaluate(device), - None => true - } + self.media.as_ref().map_or(true, |ref media| media.evaluate(device)) } /// Return an iterator over all the rules within the style-sheet. |