diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-12-09 20:27:16 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-12-09 20:27:16 +0100 |
commit | eb00aa41649ce761003a83d7791b0e1e604149cb (patch) | |
tree | 474eb694e6d9cf80a8baaee0bb01c5424bfa9e6d /components/gfx/text | |
parent | 6c37edf60296602a223c4ca8285eaba2a4cefc9e (diff) | |
download | servo-eb00aa41649ce761003a83d7791b0e1e604149cb.tar.gz servo-eb00aa41649ce761003a83d7791b0e1e604149cb.zip |
gfx: Use ? on Option more often.
Diffstat (limited to 'components/gfx/text')
-rw-r--r-- | components/gfx/text/text_run.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/components/gfx/text/text_run.rs b/components/gfx/text/text_run.rs index e66b6550dc3..8121140e480 100644 --- a/components/gfx/text/text_run.rs +++ b/components/gfx/text/text_run.rs @@ -149,10 +149,7 @@ impl<'a> Iterator for CharacterSliceIterator<'a> { // inline(always) due to the inefficient rt failures messing up inline heuristics, I think. #[inline(always)] fn next(&mut self) -> Option<TextRunSlice<'a>> { - let glyph_run = match self.glyph_run { - None => return None, - Some(glyph_run) => glyph_run, - }; + let glyph_run = self.glyph_run?; debug_assert!(!self.range.is_empty()); let byte_start = self.range.begin(); |