From 2fecf423494d331ccec354204363c40aa787233b Mon Sep 17 00:00:00 2001 From: Paul Delafosse Date: Thu, 18 Apr 2024 08:38:35 +0200 Subject: [PATCH] chore: clippy + fmt --- src/app/mod.rs | 12 ++++++------ src/app/style/app.rs | 2 +- src/app/style/mod.rs | 2 +- src/app/style/rows/generic.rs | 2 +- src/app/style/rows/mod.rs | 2 +- src/app/style/scrollable/mod.rs | 2 +- src/app/style/scrollable/scroller.rs | 4 ++-- src/app/style/search/input.rs | 2 +- src/app/style/search/mod.rs | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/app/mod.rs b/src/app/mod.rs index 062273d..6538cad 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -4,12 +4,12 @@ use std::process::exit; use iced::alignment::{Horizontal, Vertical}; use iced::futures::channel::mpsc::{Sender, TrySendError}; use iced::widget::{column, container, scrollable, text_input, Column, Container, Row, Text}; -use iced::{window, Application, Command, Element, Length, Settings, Subscription, event}; -use iced_core::widget::operation::scrollable::RelativeOffset; -use iced_core::{Event, Font, Pixels, Size}; -use iced_core::keyboard::Key; +use iced::{event, window, Application, Command, Element, Length, Settings, Subscription}; use iced_core::keyboard::key::Named; +use iced_core::keyboard::Key; +use iced_core::widget::operation::scrollable::RelativeOffset; use iced_core::window::settings::PlatformSpecific; +use iced_core::{Event, Font, Pixels, Size}; use iced_style::Theme; use onagre_launcher_toolkit::launcher::{Request, Response}; use once_cell::sync::Lazy; @@ -631,12 +631,12 @@ impl Onagre<'_> { fn keyboard_event() -> Subscription { event::listen_with(|event, _status| match event { - Event::Window(_, event) if event == window::Event::Unfocused => Some(Message::Unfocused), + Event::Window(_, window::Event::Unfocused) => Some(Message::Unfocused), Event::Keyboard(iced::keyboard::Event::KeyPressed { modifiers: _, text: _, key, - location: _ + location: _, }) => Some(Message::KeyboardEvent(key)), _ => None, }) diff --git a/src/app/style/app.rs b/src/app/style/app.rs index 6aa0ce7..826063c 100644 --- a/src/app/style/app.rs +++ b/src/app/style/app.rs @@ -4,8 +4,8 @@ use crate::app::style::search::SearchContainerStyles; use crate::app::style::Scale; use crate::config::color::OnagreColor; use crate::config::padding::OnagrePadding; -use iced_core::{Background, Border}; use iced_core::border::Radius; +use iced_core::{Background, Border}; use iced_style::container::{Appearance, StyleSheet}; // The top level container wrapping the app diff --git a/src/app/style/mod.rs b/src/app/style/mod.rs index e789434..29a7e64 100644 --- a/src/app/style/mod.rs +++ b/src/app/style/mod.rs @@ -9,8 +9,8 @@ use crate::THEME_PATH; use crate::THEME_SCALE; use iced::widget::container::Appearance; use iced::Background; -use iced_core::{Border, Length}; use iced_core::border::Radius; +use iced_core::{Border, Length}; use tracing::{error, warn}; pub mod app; diff --git a/src/app/style/rows/generic.rs b/src/app/style/rows/generic.rs index d69a44d..d190b62 100644 --- a/src/app/style/rows/generic.rs +++ b/src/app/style/rows/generic.rs @@ -3,8 +3,8 @@ use crate::config::color::OnagreColor; use crate::config::padding::OnagrePadding; use iced::alignment::{Horizontal, Vertical}; use iced::Length; -use iced_core::{Background, Border}; use iced_core::border::Radius; +use iced_core::{Background, Border}; use iced_style::container::{Appearance, StyleSheet}; #[derive(Debug, PartialEq, Clone)] diff --git a/src/app/style/rows/mod.rs b/src/app/style/rows/mod.rs index e87e2df..f8b2962 100644 --- a/src/app/style/rows/mod.rs +++ b/src/app/style/rows/mod.rs @@ -4,8 +4,8 @@ use crate::config::padding::OnagrePadding; use generic::GenericContainerStyle; use iced::alignment::{Horizontal, Vertical}; use iced::Length; -use iced_core::{Background, Border}; use iced_core::border::Radius; +use iced_core::{Background, Border}; use iced_style::container::{Appearance, StyleSheet}; use icon::IconStyle; diff --git a/src/app/style/scrollable/mod.rs b/src/app/style/scrollable/mod.rs index 0f719a5..2895e16 100644 --- a/src/app/style/scrollable/mod.rs +++ b/src/app/style/scrollable/mod.rs @@ -3,8 +3,8 @@ use crate::app::style::Scale; use crate::config::color::OnagreColor; use crate::config::padding::OnagrePadding; use iced::Length; -use iced_core::{Background, Border}; use iced_core::border::Radius; +use iced_core::{Background, Border}; use iced_style::container::{Appearance, StyleSheet}; pub mod scroller; diff --git a/src/app/style/scrollable/scroller.rs b/src/app/style/scrollable/scroller.rs index ff7d9e3..85a171c 100644 --- a/src/app/style/scrollable/scroller.rs +++ b/src/app/style/scrollable/scroller.rs @@ -2,8 +2,8 @@ use crate::app::style::Scale; use crate::config::color::OnagreColor; use iced::widget::scrollable::Scrollbar; use iced::Background; -use iced_core::Border; use iced_core::border::Radius; +use iced_core::Border; use iced_style::scrollable::{Appearance, StyleSheet}; use iced_style::theme::Scrollable; @@ -78,7 +78,7 @@ impl StyleSheet for &ScrollerStyles { color: self.scroller_border_color.into(), width: self.scroller_border_width, radius: Radius::from(self.scroller_border_radius), - } + }, }, }, gap: None, diff --git a/src/app/style/search/input.rs b/src/app/style/search/input.rs index 543907a..15edd77 100644 --- a/src/app/style/search/input.rs +++ b/src/app/style/search/input.rs @@ -3,8 +3,8 @@ use crate::config::color::OnagreColor; use crate::config::padding::OnagrePadding; use iced::alignment::{Horizontal, Vertical}; use iced::Length; -use iced_core::{Background, Border, Color}; use iced_core::border::Radius; +use iced_core::{Background, Border, Color}; use iced_style::text_input::{Appearance, StyleSheet}; #[derive(Debug, PartialEq)] diff --git a/src/app/style/search/mod.rs b/src/app/style/search/mod.rs index 93395d5..34e1929 100644 --- a/src/app/style/search/mod.rs +++ b/src/app/style/search/mod.rs @@ -1,7 +1,7 @@ use iced::alignment::{Horizontal, Vertical}; use iced::Length; -use iced_core::{Background, Border}; use iced_core::border::Radius; +use iced_core::{Background, Border}; use iced_style::container::{Appearance, StyleSheet}; use input::SearchInputStyles;