diff --git a/build.rs b/build.rs index 11b884e..4692ccd 100644 --- a/build.rs +++ b/build.rs @@ -1,7 +1,6 @@ extern crate gl_generator; use gl_generator::{Api, Fallbacks, Profile, Registry}; - use std::env; use std::fs::File; use std::path::PathBuf; diff --git a/src/backend/input.rs b/src/backend/input.rs index cb8998a..6baf26b 100644 --- a/src/backend/input.rs +++ b/src/backend/input.rs @@ -1,7 +1,6 @@ //! Common traits for input backends to receive input from. use backend::{SeatInternal, TouchSlotInternal}; - use std::error::Error; /// A seat describes a group of input devices and at least one diff --git a/src/backend/libinput.rs b/src/backend/libinput.rs index 4cbad35..c55ddf8 100644 --- a/src/backend/libinput.rs +++ b/src/backend/libinput.rs @@ -6,7 +6,6 @@ use input as libinput; use input::event; use std::collections::hash_map::{DefaultHasher, Entry, HashMap}; use std::hash::{Hash, Hasher}; - use std::io::Error as IoError; use std::rc::Rc; diff --git a/src/compositor/region.rs b/src/compositor/region.rs index b4f0b48..23952af 100644 --- a/src/compositor/region.rs +++ b/src/compositor/region.rs @@ -11,8 +11,9 @@ pub struct RegionData { impl RegionData { /// Initialize the user_data of a region, must be called right when the surface is created pub unsafe fn init(region: &wl_region::WlRegion) { - region.set_user_data(Box::into_raw(Box::new(Mutex::new(RegionData::default()))) - as *mut _) + region.set_user_data( + Box::into_raw(Box::new(Mutex::new(RegionData::default()))) as *mut _, + ) } /// Cleans the user_data of that surface, must be called when it is destroyed diff --git a/src/keyboard/mod.rs b/src/keyboard/mod.rs index 0b444de..abb44e5 100644 --- a/src/keyboard/mod.rs +++ b/src/keyboard/mod.rs @@ -21,14 +21,10 @@ use backend::input::KeyState; use std::io::{Error as IoError, Write}; use std::os::unix::io::AsRawFd; use std::sync::{Arc, Mutex}; - use tempfile::tempfile; - use wayland_server::{Liveness, Resource}; use wayland_server::protocol::{wl_keyboard, wl_surface}; - use xkbcommon::xkb; - pub use xkbcommon::xkb::{keysyms, Keysym}; /// Represents the current state of the keyboard modifiers diff --git a/src/shell/xdg_handlers.rs b/src/shell/xdg_handlers.rs index d1f27cc..c2faaec 100644 --- a/src/shell/xdg_handlers.rs +++ b/src/shell/xdg_handlers.rs @@ -682,8 +682,8 @@ where destroy: |evlh, idata, _, popup| { let ptr = popup.get_user_data(); let &(ref surface, _, _) = unsafe { - &*(ptr - as *mut ( + &*(ptr as + *mut ( wl_surface::WlSurface, zxdg_shell_v6::ZxdgShellV6, zxdg_surface_v6::ZxdgSurfaceV6,