diff options
author | Joe Wilm <joe@jwilm.com> | 2016-12-16 22:13:51 -0800 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-12-16 22:13:51 -0800 |
commit | dc918ae71a5e6c78a77994d7ce106a2253918c54 (patch) | |
tree | 537c7d13443e18ed657398f4eca0bf921ef4ac5e /src/display.rs | |
parent | 3b995ff87a54239ecacb95d51f65c17504a8d22c (diff) | |
download | alacritty-dc918ae71a5e6c78a77994d7ce106a2253918c54.tar.gz alacritty-dc918ae71a5e6c78a77994d7ce106a2253918c54.zip |
Rustup and clippy
All of the changes in this commit are due to clippy lints.
Diffstat (limited to 'src/display.rs')
-rw-r--r-- | src/display.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/display.rs b/src/display.rs index b16bf95a..b6c5f401 100644 --- a/src/display.rs +++ b/src/display.rs @@ -94,7 +94,7 @@ impl Display { let rasterizer = font::Rasterizer::new(dpi.x(), dpi.y(), dpr); // Create renderer - let mut renderer = QuadRenderer::new(&config, size); + let mut renderer = QuadRenderer::new(config, size); // Initialize glyph cache let glyph_cache = { @@ -102,7 +102,7 @@ impl Display { let init_start = ::std::time::Instant::now(); let cache = renderer.with_loader(|mut api| { - GlyphCache::new(rasterizer, &config, &mut api) + GlyphCache::new(rasterizer, config, &mut api) }); let stop = init_start.elapsed(); @@ -223,7 +223,12 @@ impl Display { { let _sampler = self.meter.sampler(); - let size_info = terminal.size_info().clone(); + // Make a copy of size_info since the closure passed here + // borrows terminal mutably + // + // TODO I wonder if the renderable cells iter could avoid the + // mutable borrow + let size_info = *terminal.size_info(); self.renderer.with_api(config, &size_info, |mut api| { api.clear(); |