From af6485cd8c85665b15ef8d2c812da17604ca4e32 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Thu, 22 Feb 2024 14:04:18 +0400 Subject: Fix new warnings --- src/dbus/gnome_shell_screenshot.rs | 1 - src/dbus/mod.rs | 1 - src/dbus/mutter_screen_cast.rs | 1 - src/handlers/mod.rs | 1 - src/input.rs | 3 +-- src/layout/focus_ring.rs | 2 +- src/layout/mod.rs | 4 ++-- src/main.rs | 2 +- src/niri.rs | 3 +-- src/pw_utils.rs | 2 +- 10 files changed, 7 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/dbus/gnome_shell_screenshot.rs b/src/dbus/gnome_shell_screenshot.rs index fbf3bc1f..61121990 100644 --- a/src/dbus/gnome_shell_screenshot.rs +++ b/src/dbus/gnome_shell_screenshot.rs @@ -1,6 +1,5 @@ use std::path::PathBuf; -use smithay::reexports::calloop; use zbus::dbus_interface; use zbus::fdo::{self, RequestNameFlags}; diff --git a/src/dbus/mod.rs b/src/dbus/mod.rs index 78b6004b..75d6da16 100644 --- a/src/dbus/mod.rs +++ b/src/dbus/mod.rs @@ -1,4 +1,3 @@ -use smithay::reexports::calloop; use zbus::blocking::Connection; use zbus::Interface; diff --git a/src/dbus/mutter_screen_cast.rs b/src/dbus/mutter_screen_cast.rs index f986442c..151a1c89 100644 --- a/src/dbus/mutter_screen_cast.rs +++ b/src/dbus/mutter_screen_cast.rs @@ -5,7 +5,6 @@ use std::sync::{Arc, Mutex}; use serde::Deserialize; use smithay::output::Output; -use smithay::reexports::calloop; use zbus::fdo::RequestNameFlags; use zbus::zvariant::{DeserializeDict, OwnedObjectPath, SerializeDict, Type, Value}; use zbus::{dbus_interface, fdo, InterfaceRef, ObjectServer, SignalContext}; diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs index f175f7bd..ec1a20a8 100644 --- a/src/handlers/mod.rs +++ b/src/handlers/mod.rs @@ -14,7 +14,6 @@ use smithay::desktop::{PopupKind, PopupManager}; use smithay::input::pointer::{CursorIcon, CursorImageStatus, PointerHandle}; use smithay::input::{keyboard, Seat, SeatHandler, SeatState}; use smithay::output::Output; -use smithay::reexports::input; use smithay::reexports::wayland_protocols::xdg::shell::server::xdg_toplevel; use smithay::reexports::wayland_server::protocol::wl_data_source::WlDataSource; use smithay::reexports::wayland_server::protocol::wl_output::WlOutput; diff --git a/src/input.rs b/src/input.rs index 0d14e7e6..93c56474 100644 --- a/src/input.rs +++ b/src/input.rs @@ -17,7 +17,6 @@ use smithay::input::pointer::{ GesturePinchBeginEvent, GesturePinchEndEvent, GesturePinchUpdateEvent, GestureSwipeBeginEvent, GestureSwipeEndEvent, GestureSwipeUpdateEvent, MotionEvent, RelativeMotionEvent, }; -use smithay::reexports::input; use smithay::utils::{Logical, Point, SERIAL_COUNTER}; use smithay::wayland::pointer_constraints::{with_pointer_constraint, PointerConstraint}; use smithay::wayland::tablet_manager::{TabletDescriptor, TabletSeatTrait}; @@ -1639,7 +1638,7 @@ pub fn apply_libinput_settings(config: &niri_config::Input, device: &mut input:: #[cfg(test)] mod tests { - use niri_config::{Action, Bind, Binds, Key, Modifiers}; + use niri_config::{Bind, Key}; use super::*; diff --git a/src/layout/focus_ring.rs b/src/layout/focus_ring.rs index 24013510..f8a70d93 100644 --- a/src/layout/focus_ring.rs +++ b/src/layout/focus_ring.rs @@ -1,7 +1,7 @@ use std::iter::zip; use arrayvec::ArrayVec; -use niri_config::{self, GradientRelativeTo}; +use niri_config::GradientRelativeTo; use smithay::backend::renderer::element::solid::{SolidColorBuffer, SolidColorRenderElement}; use smithay::backend::renderer::element::Kind; use smithay::utils::{Logical, Point, Rectangle, Scale, Size}; diff --git a/src/layout/mod.rs b/src/layout/mod.rs index de43488b..edc0d9de 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -34,7 +34,7 @@ use std::mem; use std::rc::Rc; use std::time::Duration; -use niri_config::{self, CenterFocusedColumn, Config, Struts}; +use niri_config::{CenterFocusedColumn, Config, Struts}; use niri_ipc::SizeChange; use smithay::backend::renderer::element::solid::SolidColorRenderElement; use smithay::backend::renderer::element::surface::WaylandSurfaceRenderElement; @@ -885,7 +885,7 @@ impl Layout { } let col = &ws.columns[ws.active_column_idx]; - Some((&col.tiles[col.active_tile_idx].window(), &mon.output)) + Some((col.tiles[col.active_tile_idx].window(), &mon.output)) } pub fn windows_for_output(&self, output: &Output) -> impl Iterator + '_ { diff --git a/src/main.rs b/src/main.rs index 5f475993..cc5c7545 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,7 +21,7 @@ use niri::utils::{cause_panic, version, IS_SYSTEMD_SERVICE}; use niri_config::Config; use portable_atomic::Ordering; use sd_notify::NotifyState; -use smithay::reexports::calloop::{self, EventLoop}; +use smithay::reexports::calloop::EventLoop; use smithay::reexports::wayland_server::Display; use tracing_subscriber::EnvFilter; diff --git a/src/niri.rs b/src/niri.rs index 69ae6dec..4e89e269 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -41,9 +41,8 @@ use smithay::output::{self, Output}; use smithay::reexports::calloop::generic::Generic; use smithay::reexports::calloop::timer::{TimeoutAction, Timer}; use smithay::reexports::calloop::{ - self, Idle, Interest, LoopHandle, LoopSignal, Mode, PostAction, RegistrationToken, + Idle, Interest, LoopHandle, LoopSignal, Mode, PostAction, RegistrationToken, }; -use smithay::reexports::input; use smithay::reexports::wayland_protocols::ext::session_lock::v1::server::ext_session_lock_v1::ExtSessionLockV1; use smithay::reexports::wayland_protocols::xdg::shell::server::xdg_toplevel::WmCapabilities; use smithay::reexports::wayland_protocols_misc::server_decoration as _server_decoration; diff --git a/src/pw_utils.rs b/src/pw_utils.rs index 51b2fd84..0c2dbd45 100644 --- a/src/pw_utils.rs +++ b/src/pw_utils.rs @@ -29,7 +29,7 @@ use smithay::backend::allocator::Fourcc; use smithay::backend::drm::DrmDeviceFd; use smithay::output::Output; use smithay::reexports::calloop::generic::Generic; -use smithay::reexports::calloop::{self, Interest, LoopHandle, Mode, PostAction}; +use smithay::reexports::calloop::{Interest, LoopHandle, Mode, PostAction}; use smithay::reexports::gbm::Modifier; use smithay::utils::{Physical, Size}; use zbus::SignalContext; -- cgit