diff --git a/components/gfx/platform/macos/font_template.rs b/components/gfx/platform/macos/font_template.rs index a98f60a95b2..cba1738b926 100644 --- a/components/gfx/platform/macos/font_template.rs +++ b/components/gfx/platform/macos/font_template.rs @@ -81,9 +81,8 @@ impl FontTemplateData { /// operation (depending on the platform) which performs synchronous disk I/O /// and should never be done lightly. pub fn bytes(&self) -> Vec { - match self.bytes_if_in_memory() { - Some(font_data) => return font_data, - None => {} + if let Some(font_data) = self.bytes_if_in_memory() { + return font_data; } let path = ServoUrl::parse(&*self.ctfont(0.0)