Rustfmt pass

This commit is contained in:
Daniel Collin 2020-01-01 09:53:28 +01:00
parent e02b44629c
commit 6d616640dc
4 changed files with 10 additions and 6 deletions

View file

@ -1,5 +1,5 @@
use std::mem;
use crate::{InputCallback, Key, KeyRepeat};
use std::mem;
pub struct KeyHandler {
pub key_callback: Option<Box<dyn InputCallback>>,

View file

@ -91,7 +91,7 @@ pub trait InputCallback {
mod error;
pub use self::error::Error;
pub type Result<T> = std::result::Result<T, Error>;
pub use raw_window_handle::HasRawWindowHandle as HasRawWindowHandle;
pub use raw_window_handle::HasRawWindowHandle;
mod key;
pub use key::Key;

View file

@ -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;

View file

@ -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;