From a5aef17d8f08a3eeb674ef28ac5a4aac9c495a20 Mon Sep 17 00:00:00 2001 From: Zac Pullar-Strecker Date: Fri, 7 Dec 2018 10:11:19 +1300 Subject: [PATCH] Move copypasta & font to 2018, fix windows specific code --- copypasta/src/lib.rs | 2 +- font/src/lib.rs | 8 ++++---- font/src/rusttype/mod.rs | 2 +- src/tty/windows.rs | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/copypasta/src/lib.rs b/copypasta/src/lib.rs index 796c98df..d591a04f 100644 --- a/copypasta/src/lib.rs +++ b/copypasta/src/lib.rs @@ -85,4 +85,4 @@ pub use macos::{Clipboard, Error}; #[cfg(windows)] mod windows; #[cfg(windows)] -pub use windows::{Clipboard, Error}; +pub use crate::windows::{Clipboard, Error}; diff --git a/font/src/lib.rs b/font/src/lib.rs index 6df96f28..1db08217 100644 --- a/font/src/lib.rs +++ b/font/src/lib.rs @@ -58,7 +58,7 @@ pub use ft::{Error, FreeTypeRasterizer as Rasterizer}; #[cfg(windows)] pub mod rusttype; #[cfg(windows)] -pub use rusttype::{Error, RustTypeRasterizer as Rasterizer}; +pub use crate::rusttype::{Error, RustTypeRasterizer as Rasterizer}; // If target is macos, reexport everything from darwin #[cfg(target_os = "macos")] @@ -348,13 +348,13 @@ pub trait Rasterize { Self: Sized; /// Get `Metrics` for the given `FontKey` - fn metrics(&self, FontKey, Size) -> Result; + fn metrics(&self, _: FontKey, _: Size) -> Result; /// Load the font described by `FontDesc` and `Size` - fn load_font(&mut self, &FontDesc, Size) -> Result; + fn load_font(&mut self, _: &FontDesc, _: Size) -> Result; /// Rasterize the glyph described by `GlyphKey`. - fn get_glyph(&mut self, GlyphKey) -> Result; + fn get_glyph(&mut self, _: GlyphKey) -> Result; /// Update the Rasterizer's DPI factor fn update_dpr(&mut self, device_pixel_ratio: f32); diff --git a/font/src/rusttype/mod.rs b/font/src/rusttype/mod.rs index c4fda66f..dea58150 100644 --- a/font/src/rusttype/mod.rs +++ b/font/src/rusttype/mod.rs @@ -11,7 +11,7 @@ pub struct RustTypeRasterizer { dpi_ratio: f32, } -impl ::Rasterize for RustTypeRasterizer { +impl crate::Rasterize for RustTypeRasterizer { type Err = Error; fn new(device_pixel_ratio: f32, _: bool) -> Result { diff --git a/src/tty/windows.rs b/src/tty/windows.rs index 44715b39..4895b37d 100644 --- a/src/tty/windows.rs +++ b/src/tty/windows.rs @@ -31,11 +31,11 @@ use winapi::shared::winerror::WAIT_TIMEOUT; use winpty::{ConfigFlags, MouseMode, SpawnConfig, SpawnFlags, Winpty}; use winpty::Config as WinptyConfig; -use config::{Config, Shell}; -use display::OnResize; -use cli::Options; -use tty::EventedReadWrite; -use term::SizeInfo; +use crate::config::{Config, Shell}; +use crate::display::OnResize; +use crate::cli::Options; +use crate::tty::EventedReadWrite; +use crate::term::SizeInfo; /// Handle to the winpty agent process. Required so we know when it closes. static mut HANDLE: *mut c_void = 0usize as *mut c_void;