diff options
author | Christian Duerr <contact@christianduerr.com> | 2021-07-03 03:06:52 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-03 03:06:52 +0000 |
commit | 4dd70ba3a155d1eebe38bcd5a5c4c03ca09f2fea (patch) | |
tree | 5fd25b77c2d46279cf3e23b699d47e06f02d43e4 /alacritty/src/renderer | |
parent | b0bc2a2440287268ca47ecf618c73766db9a2586 (diff) | |
download | r-alacritty-4dd70ba3a155d1eebe38bcd5a5c4c03ca09f2fea.tar.gz r-alacritty-4dd70ba3a155d1eebe38bcd5a5c4c03ca09f2fea.tar.bz2 r-alacritty-4dd70ba3a155d1eebe38bcd5a5c4c03ca09f2fea.zip |
Fix clippy warnings
Diffstat (limited to 'alacritty/src/renderer')
-rw-r--r-- | alacritty/src/renderer/mod.rs | 10 | ||||
-rw-r--r-- | alacritty/src/renderer/rects.rs | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/alacritty/src/renderer/mod.rs b/alacritty/src/renderer/mod.rs index 48fcbf20..5f71ddf5 100644 --- a/alacritty/src/renderer/mod.rs +++ b/alacritty/src/renderer/mod.rs @@ -191,7 +191,7 @@ impl GlyphCache { let size = font.size(); // Load regular font. - let regular_desc = Self::make_desc(&font.normal(), Slant::Normal, Weight::Normal); + let regular_desc = Self::make_desc(font.normal(), Slant::Normal, Weight::Normal); let regular = Self::load_regular_font(rasterizer, ®ular_desc, size)?; @@ -233,7 +233,7 @@ impl GlyphCache { error!("{}", err); let fallback_desc = - Self::make_desc(&Font::default().normal(), Slant::Normal, Weight::Normal); + Self::make_desc(Font::default().normal(), Slant::Normal, Weight::Normal); rasterizer.load_font(&fallback_desc, size) }, } @@ -372,7 +372,7 @@ impl GlyphCache { /// Calculate font metrics without access to a glyph cache. pub fn static_metrics(font: Font, dpr: f64) -> Result<crossfont::Metrics, crossfont::Error> { let mut rasterizer = crossfont::Rasterizer::new(dpr as f32, font.use_thin_strokes)?; - let regular_desc = GlyphCache::make_desc(&font.normal(), Slant::Normal, Weight::Normal); + let regular_desc = GlyphCache::make_desc(font.normal(), Slant::Normal, Weight::Normal); let regular = Self::load_regular_font(&mut rasterizer, ®ular_desc, font.size())?; rasterizer.get_glyph(GlyphKey { font_key: regular, character: 'm', size: font.size() })?; @@ -1306,12 +1306,12 @@ impl Atlas { } // If there's not enough room in current row, go onto next one. - if !self.room_in_row(&glyph) { + if !self.room_in_row(glyph) { self.advance_row()?; } // If there's still not room, there's nothing that can be done here.. - if !self.room_in_row(&glyph) { + if !self.room_in_row(glyph) { return Err(AtlasInsertError::Full); } diff --git a/alacritty/src/renderer/rects.rs b/alacritty/src/renderer/rects.rs index 591c9f46..77c22011 100644 --- a/alacritty/src/renderer/rects.rs +++ b/alacritty/src/renderer/rects.rs @@ -158,9 +158,9 @@ impl RenderLines { /// Update the stored lines with the next cell info. #[inline] pub fn update(&mut self, cell: &RenderableCell) { - self.update_flag(&cell, Flags::UNDERLINE); - self.update_flag(&cell, Flags::DOUBLE_UNDERLINE); - self.update_flag(&cell, Flags::STRIKEOUT); + self.update_flag(cell, Flags::UNDERLINE); + self.update_flag(cell, Flags::DOUBLE_UNDERLINE); + self.update_flag(cell, Flags::STRIKEOUT); } /// Update the lines for a specific flag. |