From eb00aa41649ce761003a83d7791b0e1e604149cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 9 Dec 2017 20:27:16 +0100 Subject: gfx: Use ? on Option more often. --- components/gfx/text/text_run.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'components/gfx/text') 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> { - 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(); -- cgit v1.2.3