From 89c0acf1e3fd9a6ff753b8d4b35cd5e5df28ec5d Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 17 Feb 2019 16:24:55 -0800 Subject: [PATCH] fixup some warnings, remove dead code --- src/font/system.rs | 2 +- src/gliumwindows.rs | 1 - src/winpty.rs | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/font/system.rs b/src/font/system.rs index 3a9da1500..e45f27831 100644 --- a/src/font/system.rs +++ b/src/font/system.rs @@ -4,7 +4,6 @@ use super::super::config::{Config, TextStyle}; #[cfg(unix)] use super::hbwrap as harfbuzz; use failure::Error; -use unicode_width::UnicodeWidthStr; /// A bitmap representation of a glyph. /// The data is stored as pre-multiplied RGBA 32bpp. @@ -49,6 +48,7 @@ impl GlyphInfo { info: &harfbuzz::hb_glyph_info_t, pos: &harfbuzz::hb_glyph_position_t, ) -> GlyphInfo { + use unicode_width::UnicodeWidthStr; let num_cells = UnicodeWidthStr::width(text) as u8; GlyphInfo { #[cfg(debug_assertions)] diff --git a/src/gliumwindows.rs b/src/gliumwindows.rs index 792252964..d49a45680 100644 --- a/src/gliumwindows.rs +++ b/src/gliumwindows.rs @@ -131,7 +131,6 @@ impl TerminalWindow { let display = { let pref_context = glutin::ContextBuilder::new() - //.with_gl(glutin::GlRequest::Specific(glutin::Api::OpenGlEs, (2, 0))) .with_vsync(true) .with_pixel_format(24, 8) .with_srgb(true); diff --git a/src/winpty.rs b/src/winpty.rs index e8913d054..a9208d1ee 100644 --- a/src/winpty.rs +++ b/src/winpty.rs @@ -474,7 +474,7 @@ impl MasterPty { pub fn try_clone(&self) -> Result { // FIXME: this isn't great. Replace this with a way to // clone the output handle and read it. - let mut inner = self.inner.lock().unwrap(); + let inner = self.inner.lock().unwrap(); Ok(Self { inner: Arc::new(Mutex::new(Inner { con: PsuedoCon {