From c85efc6180fa6b450fd444230469230e0bd2a26a Mon Sep 17 00:00:00 2001 From: Lionel DARNIS Date: Mon, 25 May 2026 13:02:25 +0200 Subject: [PATCH] yoda: bump iced submodule + cargo auto-fix sweeps (squashed) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Squash of 6 yoda commits: - 282813c8 yoda: bump iced -> window_clipboard via public Forgejo fork - cdf34938 yoda: cargo fix --lib (libcosmic-yoda) — drop 99 trivial warnings - 38a988cb yoda: cargo fix on cosmic-config + bump iced auto-fix commit - 301bbf6e yoda: bump iced submodule -> iced_winit warning cleanup (0 left) - b94c03d9 yoda: bump iced submodule -> iced_widget cleanup (0 left) - a9492d76 yoda: bump iced submodule -> all iced crates at 0 warnings --- src/app/cosmic.rs | 4 ++-- src/app/mod.rs | 2 +- src/ext.rs | 1 - src/scroll.rs | 3 +-- src/theme/style/segmented_button.rs | 4 ++-- src/widget/button/widget.rs | 8 ++++---- src/widget/cards.rs | 2 +- src/widget/color_picker/mod.rs | 2 +- src/widget/context_menu.rs | 4 ++-- src/widget/dropdown/menu/mod.rs | 11 +++++------ src/widget/dropdown/multi/menu.rs | 2 +- src/widget/dropdown/multi/widget.rs | 7 +++---- src/widget/dropdown/operation.rs | 3 --- src/widget/dropdown/widget.rs | 15 +++++++-------- src/widget/flex_row/widget.rs | 2 +- src/widget/grid/widget.rs | 2 +- src/widget/icon/bundle.rs | 2 +- src/widget/mod.rs | 2 -- src/widget/text_input/input.rs | 18 +++++++++--------- 19 files changed, 42 insertions(+), 52 deletions(-) diff --git a/src/app/cosmic.rs b/src/app/cosmic.rs index 2d5b10d3..6de7f35b 100644 --- a/src/app/cosmic.rs +++ b/src/app/cosmic.rs @@ -546,7 +546,7 @@ where f64::from(self.app.core().scale_factor()) } - pub fn style(&self, theme: &Theme) -> theme::Style { + pub fn style(&self, _theme: &Theme) -> theme::Style { if let Some(style) = self.app.style() { style } else if self.app.core().window.is_maximized { @@ -761,7 +761,7 @@ impl Cosmic { #[allow(clippy::too_many_lines)] fn cosmic_update(&mut self, message: Action) -> iced::Task> { match message { - Action::WindowMaximized(id, maximized) => { + Action::WindowMaximized(_id, _maximized) => { #[cfg(not(all(feature = "wayland", target_os = "linux")))] if self .app diff --git a/src/app/mod.rs b/src/app/mod.rs index f757d5be..1ed17855 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -136,7 +136,7 @@ pub fn run(settings: Settings, flags: App::Flags) -> iced::Res crate::malloc::limit_mmap_threshold(threshold); } - let default_font = settings.default_font; + let _default_font = settings.default_font; let (settings, (mut core, flags), window_settings) = iced_settings::(settings, flags); #[cfg(not(feature = "multi-window"))] { diff --git a/src/ext.rs b/src/ext.rs index 8eb749e5..65ca0145 100644 --- a/src/ext.rs +++ b/src/ext.rs @@ -2,7 +2,6 @@ // SPDX-License-Identifier: MPL-2.0 use iced::Color; -use iced_core::Widget; pub trait ElementExt { #[must_use] diff --git a/src/scroll.rs b/src/scroll.rs index b6d42378..67947399 100644 --- a/src/scroll.rs +++ b/src/scroll.rs @@ -1,4 +1,3 @@ -use iced::Task; use iced::mouse::ScrollDelta; use std::time::{Duration, Instant}; @@ -95,7 +94,7 @@ impl Scroll { } else { // Return integer part of scroll, and keep remainder self.scroll = Some((scroll.fract(), Instant::now())); - let mut discrete = scroll.trunc() as isize; + let discrete = scroll.trunc() as isize; if discrete != 0 { self.last_discrete = Some(Instant::now()); } diff --git a/src/theme/style/segmented_button.rs b/src/theme/style/segmented_button.rs index 381c4a05..45fcc0b8 100644 --- a/src/theme/style/segmented_button.rs +++ b/src/theme/style/segmented_button.rs @@ -185,7 +185,7 @@ mod horizontal { pub fn selection_active( cosmic: &cosmic_theme::Theme, - component: &Component, + _component: &Component, ) -> ItemStatusAppearance { let rad_xl = cosmic.corner_radii.radius_xl; let rad_0 = cosmic.corner_radii.radius_0; @@ -280,7 +280,7 @@ mod vertical { pub fn selection_active( cosmic: &cosmic_theme::Theme, - component: &Component, + _component: &Component, ) -> ItemStatusAppearance { let rad_0 = cosmic.corner_radii.radius_0; let rad_xl = cosmic.corner_radii.radius_xl; diff --git a/src/widget/button/widget.rs b/src/widget/button/widget.rs index a9d44b2b..ebdf2d66 100644 --- a/src/widget/button/widget.rs +++ b/src/widget/button/widget.rs @@ -10,7 +10,7 @@ use iced::Alignment; use iced_runtime::core::widget::Id; use iced_runtime::{Action, Task, keyboard, task}; -use iced_core::event::{self, Event}; +use iced_core::event::Event; use iced_core::renderer::{self, Quad, Renderer}; use iced_core::widget::Operation; use iced_core::widget::tree::{self, Tree}; @@ -681,7 +681,7 @@ impl<'a, Message: 'a + Clone> Widget height, } = layout.bounds(); let bounds = Rect::new(x as f64, y as f64, (x + width) as f64, (y + height) as f64); - let is_hovered = state.state.downcast_ref::().is_hovered; + let _is_hovered = state.state.downcast_ref::().is_hovered; let mut node = Node::new(Role::Button); node.add_action(Action::Focus); @@ -841,7 +841,7 @@ pub fn update<'a, Message: Clone>( } } #[cfg(feature = "a11y")] - Event::A11y(event_id, iced_accessibility::accesskit::ActionRequest { action, .. }) => { + Event::A11y(_event_id, iced_accessibility::accesskit::ActionRequest { action, .. }) => { let state = state(); if let Some(on_press) = matches!(action, iced_accessibility::accesskit::Action::Click) .then_some(on_press) @@ -884,7 +884,7 @@ pub fn draw( viewport_bounds: Rectangle, styling: &super::style::Style, draw_contents: impl FnOnce(&mut Renderer, &Style), - is_image: bool, + _is_image: bool, ) where Theme: super::style::Catalog, { diff --git a/src/widget/cards.rs b/src/widget/cards.rs index 43325002..afdd1fe6 100644 --- a/src/widget/cards.rs +++ b/src/widget/cards.rs @@ -93,7 +93,7 @@ where /// Get an expandable stack of cards #[allow(clippy::too_many_arguments)] pub fn new( - id: widget::Id, + _id: widget::Id, card_inner_elements: Vec>, on_clear_all: Message, on_show_more: Option, diff --git a/src/widget/color_picker/mod.rs b/src/widget/color_picker/mod.rs index 3bebee35..ce733655 100644 --- a/src/widget/color_picker/mod.rs +++ b/src/widget/color_picker/mod.rs @@ -16,7 +16,7 @@ use crate::widget::segmented_button::Entity; use crate::widget::{container, slider}; use derive_setters::Setters; use iced::Task; -use iced_core::event::{self, Event}; +use iced_core::event::Event; use iced_core::gradient::{ColorStop, Linear}; use iced_core::renderer::Quad; use iced_core::widget::{Tree, tree}; diff --git a/src/widget/context_menu.rs b/src/widget/context_menu.rs index 7bc18250..0d3ba1fb 100644 --- a/src/widget/context_menu.rs +++ b/src/widget/context_menu.rs @@ -91,7 +91,7 @@ impl ContextMenu<'_, Message> { bounds.x = my_state.context_cursor.x; bounds.y = my_state.context_cursor.y; - let (id, root_list) = my_state.menu_bar_state.inner.with_data_mut(|state| { + let (id, _root_list) = my_state.menu_bar_state.inner.with_data_mut(|state| { if let Some(id) = state.popup_id.get(&self.window_id).copied() { // close existing popups state.menu_states.clear(); @@ -149,7 +149,7 @@ impl ContextMenu<'_, Message> { layout.bounds(), -bounds.height, ); - let (anchor_rect, gravity) = my_state.menu_bar_state.inner.with_data_mut(|state| { + let (anchor_rect, _gravity) = my_state.menu_bar_state.inner.with_data_mut(|state| { use iced::Rectangle; state.popup_id.insert(self.window_id, id); diff --git a/src/widget/dropdown/menu/mod.rs b/src/widget/dropdown/menu/mod.rs index 0c96c1c6..bb3cead1 100644 --- a/src/widget/dropdown/menu/mod.rs +++ b/src/widget/dropdown/menu/mod.rs @@ -8,9 +8,8 @@ use std::sync::{Arc, Mutex}; pub use appearance::{Appearance, StyleSheet}; -use crate::surface; use crate::widget::{Container, RcWrapper, icon}; -use iced_core::event::{self, Event}; +use iced_core::event::Event; use iced_core::layout::{self, Layout}; use iced_core::text::{self, Text}; use iced_core::widget::Tree; @@ -391,7 +390,7 @@ impl<'a, Message: Clone + 'a> crate::widget::Widget, - cursor: mouse::Cursor, + _cursor: mouse::Cursor, viewport: &Rectangle, ) { let appearance = theme.appearance(&()); diff --git a/src/widget/dropdown/multi/menu.rs b/src/widget/dropdown/multi/menu.rs index 0a761097..a1da9da7 100644 --- a/src/widget/dropdown/multi/menu.rs +++ b/src/widget/dropdown/multi/menu.rs @@ -2,7 +2,7 @@ use super::Model; pub use crate::widget::dropdown::menu::{Appearance, StyleSheet}; use crate::widget::Container; -use iced_core::event::{self, Event}; +use iced_core::event::Event; use iced_core::layout::{self, Layout}; use iced_core::text::{self, Text}; use iced_core::widget::Tree; diff --git a/src/widget/dropdown/multi/widget.rs b/src/widget/dropdown/multi/widget.rs index 3c01f5f8..90c6ab71 100644 --- a/src/widget/dropdown/multi/widget.rs +++ b/src/widget/dropdown/multi/widget.rs @@ -5,7 +5,7 @@ use super::menu::{self, Menu}; use crate::widget::icon; use derive_setters::Setters; -use iced_core::event::{self, Event}; +use iced_core::event::Event; use iced_core::text::{self, Paragraph, Text}; use iced_core::widget::tree::{self, Tree}; use iced_core::{ @@ -13,7 +13,6 @@ use iced_core::{ alignment, keyboard, layout, mouse, overlay, renderer, svg, touch, }; use iced_widget::pick_list; -use std::ffi::OsStr; pub use iced_widget::pick_list::{Catalog, Style}; @@ -253,7 +252,7 @@ impl Default for State { /// Computes the layout of a [`Dropdown`]. #[allow(clippy::too_many_arguments)] pub fn layout( - renderer: &crate::Renderer, + _renderer: &crate::Renderer, limits: &layout::Limits, width: Length, gap: f32, @@ -376,7 +375,7 @@ pub fn mouse_interaction(layout: Layout<'_>, cursor: mouse::Cursor) -> mouse::In #[allow(clippy::too_many_arguments)] pub fn overlay<'a, S: AsRef, Message: 'a, Item: Clone + PartialEq + 'static>( layout: Layout<'_>, - renderer: &crate::Renderer, + _renderer: &crate::Renderer, state: &'a mut State, gap: f32, padding: Padding, diff --git a/src/widget/dropdown/operation.rs b/src/widget/dropdown/operation.rs index 1a4e1a9f..4cd266d4 100644 --- a/src/widget/dropdown/operation.rs +++ b/src/widget/dropdown/operation.rs @@ -2,9 +2,6 @@ // SPDX-License-Identifier: MPL-2.0 AND MIT //! Operate on dropdown widgets. -use super::State; -use iced::Rectangle; -use iced_core::widget::{Id, Operation}; pub trait Dropdown { fn close(&mut self); diff --git a/src/widget/dropdown/widget.rs b/src/widget/dropdown/widget.rs index 3aa4660b..20a0e70e 100644 --- a/src/widget/dropdown/widget.rs +++ b/src/widget/dropdown/widget.rs @@ -8,7 +8,7 @@ use crate::widget::icon::{self, Handle}; use crate::{Element, surface}; use derive_setters::Setters; use iced::window; -use iced_core::event::{self, Event}; +use iced_core::event::Event; use iced_core::text::{self, Paragraph, Text}; use iced_core::widget::tree::{self, Tree}; use iced_core::{ @@ -17,7 +17,6 @@ use iced_core::{ }; use iced_widget::pick_list::{self, Catalog}; use std::borrow::Cow; -use std::ffi::OsStr; use std::hash::{DefaultHasher, Hash, Hasher}; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{Arc, LazyLock, Mutex}; @@ -328,10 +327,10 @@ where fn operate( &mut self, - tree: &mut Tree, + _tree: &mut Tree, _layout: Layout<'_>, _renderer: &crate::Renderer, - operation: &mut dyn iced_core::widget::Operation, + _operation: &mut dyn iced_core::widget::Operation, ) { // TODO: double check operation handling // let state = tree.state.downcast_mut::(); @@ -343,7 +342,7 @@ where tree: &'b mut Tree, layout: Layout<'b>, renderer: &crate::Renderer, - viewport: &Rectangle, + _viewport: &Rectangle, translation: Vector, ) -> Option> { #[cfg(all(feature = "wayland", target_os = "linux"))] @@ -452,7 +451,7 @@ impl super::operation::Dropdown for State { /// Computes the layout of a [`Dropdown`]. #[allow(clippy::too_many_arguments)] pub fn layout( - renderer: &crate::Renderer, + _renderer: &crate::Renderer, limits: &layout::Limits, width: Length, gap: f32, @@ -546,7 +545,7 @@ pub fn update< cursor: mouse::Cursor, shell: &mut Shell<'_, Message>, #[cfg(all(feature = "wayland", target_os = "linux"))] - positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner, + _positioner: iced_runtime::platform_specific::wayland::popup::SctkPositioner, on_selected: Arc Message + Send + Sync + 'static>, selected: Option, selections: &[S], @@ -558,7 +557,7 @@ pub fn update< gap: f32, padding: Padding, text_size: Option, - font: Option, + _font: Option, selected_option: Option, ) { let state = state(); diff --git a/src/widget/flex_row/widget.rs b/src/widget/flex_row/widget.rs index 0b2e6e13..e5c0b615 100644 --- a/src/widget/flex_row/widget.rs +++ b/src/widget/flex_row/widget.rs @@ -3,7 +3,7 @@ use crate::{Element, Renderer}; use derive_setters::Setters; -use iced_core::event::{self, Event}; +use iced_core::event::Event; use iced_core::widget::{Operation, Tree}; use iced_core::{ Clipboard, Layout, Length, Padding, Rectangle, Shell, Vector, Widget, layout, mouse, overlay, diff --git a/src/widget/grid/widget.rs b/src/widget/grid/widget.rs index e59ba90d..55ce3c91 100644 --- a/src/widget/grid/widget.rs +++ b/src/widget/grid/widget.rs @@ -3,7 +3,7 @@ use crate::{Element, Renderer}; use derive_setters::Setters; -use iced_core::event::{self, Event}; +use iced_core::event::Event; use iced_core::widget::{Operation, Tree}; use iced_core::{ Alignment, Clipboard, Layout, Length, Padding, Rectangle, Shell, Vector, Widget, layout, mouse, diff --git a/src/widget/icon/bundle.rs b/src/widget/icon/bundle.rs index bb6ce244..30a9938a 100644 --- a/src/widget/icon/bundle.rs +++ b/src/widget/icon/bundle.rs @@ -5,7 +5,7 @@ /// Icon bundling is not enabled on unix platforms. #[cfg(all(unix, not(target_os = "macos")))] -pub fn get(icon_name: &str) -> Option { +pub fn get(_icon_name: &str) -> Option { None } diff --git a/src/widget/mod.rs b/src/widget/mod.rs index e68e7477..5764ab44 100644 --- a/src/widget/mod.rs +++ b/src/widget/mod.rs @@ -119,8 +119,6 @@ pub mod calendar; pub use calendar::{Calendar, calendar}; pub mod card; -#[doc(inline)] -pub use card::*; pub mod color_picker; #[doc(inline)] diff --git a/src/widget/text_input/input.rs b/src/widget/text_input/input.rs index 65b84882..a8b668c0 100644 --- a/src/widget/text_input/input.rs +++ b/src/widget/text_input/input.rs @@ -21,12 +21,12 @@ use apply::Apply; use iced::Limits; use iced::clipboard::dnd::{DndAction, DndEvent, OfferEvent, SourceEvent}; use iced::clipboard::mime::AsMimeTypes; -use iced_core::event::{self, Event}; +use iced_core::event::Event; use iced_core::input_method::{self, InputMethod, Preedit}; use iced_core::mouse::{self, click}; use iced_core::overlay::Group; use iced_core::renderer::{self, Renderer as CoreRenderer}; -use iced_core::text::{self, Affinity, Paragraph, Renderer, Text}; +use iced_core::text::{self, Paragraph, Renderer, Text}; use iced_core::time::{Duration, Instant}; use iced_core::widget::Id; use iced_core::widget::operation::{self, Operation}; @@ -825,7 +825,7 @@ where &mut self, tree: &mut Tree, layout: Layout<'_>, - renderer: &crate::Renderer, + _renderer: &crate::Renderer, operation: &mut dyn Operation, ) { operation.container(Some(&self.id), layout.bounds()); @@ -917,7 +917,7 @@ where // Enable custom buttons defined on the trailing icon position to be handled. if !self.is_editable_variant { if let Some(trailing_layout) = trailing_icon_layout { - let res = trailing_icon.as_widget_mut().update( + let _res = trailing_icon.as_widget_mut().update( tree, event, trailing_layout, @@ -2229,7 +2229,7 @@ pub fn update<'a, Message: Clone + 'static>( )) if *rectangle == Some(dnd_id) => { cold(); let state = state(); - let is_clicked = text_layout.bounds().contains(Point { + let _is_clicked = text_layout.bounds().contains(Point { x: *x as f32, y: *y as f32, }); @@ -2237,7 +2237,7 @@ pub fn update<'a, Message: Clone + 'static>( let mut accepted = false; for m in mime_types { if SUPPORTED_TEXT_MIME_TYPES.contains(&m.as_str()) { - let clone = m.clone(); + let _clone = m.clone(); accepted = true; } } @@ -2300,7 +2300,7 @@ pub fn update<'a, Message: Clone + 'static>( cold(); let state = state(); if let DndOfferState::HandlingOffer(mime_types, _action) = state.dnd_offer.clone() { - let Some(mime_type) = SUPPORTED_TEXT_MIME_TYPES + let Some(_mime_type) = SUPPORTED_TEXT_MIME_TYPES .iter() .find(|&&m| mime_types.iter().any(|t| t == m)) else { @@ -2317,7 +2317,7 @@ pub fn update<'a, Message: Clone + 'static>( Event::Dnd(DndEvent::Offer(id, OfferEvent::LeaveDestination)) if Some(dnd_id) != *id => {} #[cfg(all(feature = "wayland", target_os = "linux"))] Event::Dnd(DndEvent::Offer( - rectangle, + _rectangle, OfferEvent::Leave | OfferEvent::LeaveDestination, )) => { cold(); @@ -2620,7 +2620,7 @@ pub fn draw<'a, Message>( let handling_dnd_offer = !matches!(state.dnd_offer, DndOfferState::None); #[cfg(not(all(feature = "wayland", target_os = "linux")))] let handling_dnd_offer = false; - let (cursors, offset, is_selecting) = if let Some(focus) = + let (cursors, offset, _is_selecting) = if let Some(focus) = state.is_focused.filter(|f| f.focused).or_else(|| { let now = Instant::now(); handling_dnd_offer.then_some(Focus {