From 6d616640dc620f1c8ed81872ea1a1bde70248a2a Mon Sep 17 00:00:00 2001 From: Daniel Collin Date: Wed, 1 Jan 2020 09:53:28 +0100 Subject: [PATCH] Rustfmt pass --- src/key_handler.rs | 2 +- src/lib.rs | 2 +- src/os/unix/mod.rs | 8 +++++--- src/os/windows/mod.rs | 4 +++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/key_handler.rs b/src/key_handler.rs index 0c95af5..4c41f28 100644 --- a/src/key_handler.rs +++ b/src/key_handler.rs @@ -1,5 +1,5 @@ -use std::mem; use crate::{InputCallback, Key, KeyRepeat}; +use std::mem; pub struct KeyHandler { pub key_callback: Option>, diff --git a/src/lib.rs b/src/lib.rs index fcdc732..5722180 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -91,7 +91,7 @@ pub trait InputCallback { mod error; pub use self::error::Error; pub type Result = std::result::Result; -pub use raw_window_handle::HasRawWindowHandle as HasRawWindowHandle; +pub use raw_window_handle::HasRawWindowHandle; mod key; pub use key::Key; diff --git a/src/os/unix/mod.rs b/src/os/unix/mod.rs index e6a1b45..df7eb2b 100644 --- a/src/os/unix/mod.rs +++ b/src/os/unix/mod.rs @@ -8,12 +8,14 @@ // turn off a gazillion warnings about X keysym names #![allow(non_upper_case_globals)] +use crate::key_handler::KeyHandler; +use crate::rate::UpdateRate; +use crate::{ + InputCallback, Key, KeyRepeat, MouseButton, MouseMode, Scale, ScaleMode, WindowOptions, +}; use x11_dl::keysym::*; use x11_dl::xcursor; use x11_dl::xlib; -use crate::key_handler::KeyHandler; -use crate::rate::UpdateRate; -use crate::{InputCallback, Key, KeyRepeat, MouseButton, MouseMode, Scale, ScaleMode, WindowOptions}; use crate::error::Error; use crate::Result; diff --git a/src/os/windows/mod.rs b/src/os/windows/mod.rs index 79134d6..c4baacc 100644 --- a/src/os/windows/mod.rs +++ b/src/os/windows/mod.rs @@ -7,7 +7,9 @@ use crate::key_handler::KeyHandler; use crate::rate::UpdateRate; use crate::Result; use crate::{CursorStyle, MenuHandle, MenuItem, MenuItemHandle}; -use crate::{InputCallback, Key, KeyRepeat, MouseButton, MouseMode, Scale, ScaleMode, WindowOptions}; +use crate::{ + InputCallback, Key, KeyRepeat, MouseButton, MouseMode, Scale, ScaleMode, WindowOptions, +}; use crate::{MENU_KEY_ALT, MENU_KEY_CTRL, MENU_KEY_SHIFT, MENU_KEY_WIN}; use crate::buffer_helper;