diff options
author | Johannes Linke <johannes.linke@posteo.de> | 2016-01-02 16:51:01 +0100 |
---|---|---|
committer | Johannes Linke <johannes.linke@posteo.de> | 2016-01-02 23:27:15 +0100 |
commit | 6b215f38eefc98853244c2ec6f4187ae6f000417 (patch) | |
tree | cf4dbc65e6b6fa641359b713f91b596bf9f9a666 /components/gfx/font_cache_task.rs | |
parent | b1ca3d1cdff412c5ae12113c3681f789becebabc (diff) | |
download | servo-6b215f38eefc98853244c2ec6f4187ae6f000417.tar.gz servo-6b215f38eefc98853244c2ec6f4187ae6f000417.zip |
Fix a bunch of clippy lints
Diffstat (limited to 'components/gfx/font_cache_task.rs')
-rw-r--r-- | components/gfx/font_cache_task.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/components/gfx/font_cache_task.rs b/components/gfx/font_cache_task.rs index aba00250ba1..b7ba44b4b3a 100644 --- a/components/gfx/font_cache_task.rs +++ b/components/gfx/font_cache_task.rs @@ -39,7 +39,7 @@ impl FontTemplates { } /// Find a font in this family that matches a given descriptor. - fn find_font_for_style<'a>(&'a mut self, desc: &FontTemplateDescriptor, fctx: &FontContextHandle) + fn find_font_for_style(&mut self, desc: &FontTemplateDescriptor, fctx: &FontContextHandle) -> Option<Arc<FontTemplateData>> { // TODO(Issue #189): optimize lookup for // regular/bold/italic/bolditalic with fixed offsets and a @@ -251,7 +251,7 @@ impl FontCache { } } - fn find_font_in_local_family<'a>(&'a mut self, family_name: &LowercaseString, desc: &FontTemplateDescriptor) + fn find_font_in_local_family(&mut self, family_name: &LowercaseString, desc: &FontTemplateDescriptor) -> Option<Arc<FontTemplateData>> { // TODO(Issue #188): look up localized font family names if canonical name not found // look up canonical name @@ -275,14 +275,13 @@ impl FontCache { } } - fn find_font_in_web_family<'a>(&'a mut self, family: &FontFamily, desc: &FontTemplateDescriptor) + fn find_font_in_web_family(&mut self, family: &FontFamily, desc: &FontTemplateDescriptor) -> Option<Arc<FontTemplateData>> { let family_name = LowercaseString::new(family.name()); if self.web_families.contains_key(&family_name) { let templates = self.web_families.get_mut(&family_name).unwrap(); - let maybe_font = templates.find_font_for_style(desc, &self.font_context); - maybe_font + templates.find_font_for_style(desc, &self.font_context) } else { None } |