aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/platform
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-12-09 20:27:16 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-12-09 20:27:16 +0100
commiteb00aa41649ce761003a83d7791b0e1e604149cb (patch)
tree474eb694e6d9cf80a8baaee0bb01c5424bfa9e6d /components/gfx/platform
parent6c37edf60296602a223c4ca8285eaba2a4cefc9e (diff)
downloadservo-eb00aa41649ce761003a83d7791b0e1e604149cb.tar.gz
servo-eb00aa41649ce761003a83d7791b0e1e604149cb.zip
gfx: Use ? on Option more often.
Diffstat (limited to 'components/gfx/platform')
-rw-r--r--components/gfx/platform/macos/font.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/components/gfx/platform/macos/font.rs b/components/gfx/platform/macos/font.rs
index 3ecef760a15..beb8f9f4f2f 100644
--- a/components/gfx/platform/macos/font.rs
+++ b/components/gfx/platform/macos/font.rs
@@ -69,11 +69,7 @@ impl FontHandle {
/// Cache all the data needed for basic horizontal kerning. This is used only as a fallback or
/// fast path (when the GPOS table is missing or unnecessary) so it needn't handle every case.
fn find_h_kern_subtable(&self) -> Option<CachedKernTable> {
- let font_table = match self.table_for_tag(KERN) {
- Some(table) => table,
- None => return None
- };
-
+ let font_table = self.table_for_tag(KERN)?;
let mut result = CachedKernTable {
font_table: font_table,
pair_data_range: 0..0,