aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/gfx/platform/macos/font_template.rs5
1 files changed, 2 insertions, 3 deletions
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<u8> {
- 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)