diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2016-12-25 17:34:42 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2016-12-25 19:18:31 +0100 |
commit | 39e082af180f16d9dcbcc6ea48a5bcfc684f7742 (patch) | |
tree | 7f416ee9e6015473d996decda7845e0d2255a525 /components/gfx/platform/macos/font_template.rs | |
parent | 6264268c82d852ef86cb4308190dfb7f9468dcff (diff) | |
download | servo-39e082af180f16d9dcbcc6ea48a5bcfc684f7742.tar.gz servo-39e082af180f16d9dcbcc6ea48a5bcfc684f7742.zip |
gfx: Simplify OSX font template bytes accessor.
Diffstat (limited to 'components/gfx/platform/macos/font_template.rs')
-rw-r--r-- | components/gfx/platform/macos/font_template.rs | 5 |
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) |