diff --git a/examples/config/src/main.rs b/examples/config/src/main.rs index f606e15c..f6fb5c0d 100644 --- a/examples/config/src/main.rs +++ b/examples/config/src/main.rs @@ -4,7 +4,7 @@ use cosmic_config::{Config, ConfigGet, ConfigSet}; fn test_config(config: Config) { - let watcher = config + let _watcher = config .watch(|config, keys| { println!("Changed: {:?}", keys); for key in keys.iter() { diff --git a/examples/cosmic/src/window.rs b/examples/cosmic/src/window.rs index 8f621c19..b4016ea9 100644 --- a/examples/cosmic/src/window.rs +++ b/examples/cosmic/src/window.rs @@ -8,7 +8,6 @@ use cosmic::{ font::load_fonts, iced::{self, Application, Command, Length, Subscription}, iced::{ - subscription, widget::{self, column, container, horizontal_space, row, text}, window::{self, close, drag, minimize, toggle_maximize}, }, @@ -306,10 +305,10 @@ impl Window { ]).into() } - fn view_unimplemented_sub_page<'a, Message: Clone + From + 'static>( - &'a self, + fn view_unimplemented_sub_page + 'static>( + &self, sub_page: impl SubPage, - ) -> Element<'a, Message> { + ) -> Element<'_, Message> { settings::view_column(vec![ self.parent_page_button(sub_page), text("We haven't created that panel yet, and/or it is using a similar idea as current Pop! designs.").into(), diff --git a/examples/multi-window/src/window.rs b/examples/multi-window/src/window.rs index 4c9b1407..0b269cf7 100644 --- a/examples/multi-window/src/window.rs +++ b/examples/multi-window/src/window.rs @@ -5,7 +5,7 @@ use cosmic::{ iced::{self, event, window}, iced_core::{id, Alignment, Length, Point}, iced_widget::{column, container, scrollable, text, text_input}, - widget::{button, cosmic_container}, + widget::button, Command, }; diff --git a/src/app/mod.rs b/src/app/mod.rs index 17d37dbf..ab42dd5d 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -101,7 +101,7 @@ pub(crate) fn iced_settings( autosize: settings.autosize, client_decorations: settings.client_decorations, resizable: settings.resizable, - size: (settings.size.width as u32, settings.size.height as u32).into(), + size: (settings.size.width as u32, settings.size.height as u32), size_limits: settings.size_limits, title: None, transparent: settings.transparent, @@ -567,9 +567,7 @@ impl ApplicationExt for App { #[cfg(not(feature = "multi-window"))] fn set_window_title(&mut self, title: String) -> iced::Command> { - self.core_mut() - .title - .insert(window::Id::MAIN, title.clone()); + self.core_mut().title.insert(window::Id::MAIN, title); iced::Command::none() } diff --git a/src/widget/context_drawer/overlay.rs b/src/widget/context_drawer/overlay.rs index a66f3900..1096c89d 100644 --- a/src/widget/context_drawer/overlay.rs +++ b/src/widget/context_drawer/overlay.rs @@ -34,7 +34,7 @@ where let mut node = self .content .as_widget() - .layout(&mut self.tree, renderer, &limits); + .layout(self.tree, renderer, &limits); let node_size = node.size(); node.move_to(Point { diff --git a/src/widget/menu/menu_inner.rs b/src/widget/menu/menu_inner.rs index a0f3439c..a731c98d 100644 --- a/src/widget/menu/menu_inner.rs +++ b/src/widget/menu/menu_inner.rs @@ -484,8 +484,8 @@ where (root, Vec::new()), |(menu_root, mut nodes), (_i, ms)| { let slice = ms.slice(bounds, overlay_offset, self.item_height); - let start_index = slice.start_index; - let end_index = slice.end_index; + let _start_index = slice.start_index; + let _end_index = slice.end_index; let children_node = ms.layout( overlay_offset, slice, diff --git a/src/widget/text_input/input.rs b/src/widget/text_input/input.rs index 02386a03..043718ed 100644 --- a/src/widget/text_input/input.rs +++ b/src/widget/text_input/input.rs @@ -640,7 +640,7 @@ where if cursor_position.is_over(leading_icon_layout.bounds()) { return leading_icon.as_widget_mut().on_event( tree, - event.clone(), + event, leading_icon_layout, cursor_position, renderer, @@ -678,7 +678,7 @@ where if cursor_position.is_over(trailing_icon_layout.bounds()) { return trailing_icon.as_widget_mut().on_event( tree, - event.clone(), + event, trailing_icon_layout, cursor_position, renderer, @@ -1579,7 +1579,7 @@ where } }))); let target = x as f32 - text_layout.bounds().x; - state.dnd_offer = DndOfferState::HandlingOffer(mime_types.clone(), DndAction::None); + state.dnd_offer = DndOfferState::HandlingOffer(mime_types, DndAction::None); // existing logic for setting the selection let position = if target > 0.0 { let value = if is_secure { @@ -1646,7 +1646,7 @@ where accepted: DndAction::Move.union(DndAction::Copy), } }))); - state.dnd_offer = DndOfferState::HandlingOffer(mime_types.clone(), action); + state.dnd_offer = DndOfferState::HandlingOffer(mime_types, action); } }; let target = x as f32 - text_layout.bounds().x;