yoda: cargo fix --lib across all crates — drop ~115 trivial warnings
Some checks are pending
Audit / vulnerabilities (push) Waiting to run
Check / wasm (push) Waiting to run
Check / widget (push) Waiting to run
Document / all (push) Waiting to run
Format / all (push) Waiting to run
Lint / all (push) Waiting to run
Test / all (macOS-latest, 1.88) (push) Waiting to run
Test / all (macOS-latest, beta) (push) Waiting to run
Test / all (macOS-latest, stable) (push) Waiting to run
Test / all (ubuntu-latest, 1.88) (push) Waiting to run
Test / all (ubuntu-latest, beta) (push) Waiting to run
Test / all (ubuntu-latest, stable) (push) Waiting to run
Test / all (windows-latest, 1.88) (push) Waiting to run
Test / all (windows-latest, beta) (push) Waiting to run
Test / all (windows-latest, stable) (push) Waiting to run

Auto-applied suggestions (unused imports, _-prefixed unused params,
redundant mutability) on iced_core, iced_widget, iced_runtime, iced_winit,
iced_wgpu, iced_graphics, iced_tiny_skia. From 170 warnings down to 55.

Leyoda 2026 – GPLv3
This commit is contained in:
Votre Nom 2026-05-05 16:45:37 +02:00
parent f388dfdfe4
commit 8a7a32ff92
45 changed files with 85 additions and 139 deletions

View file

@ -599,7 +599,7 @@ where
(x + width) as f64,
(y + height) as f64,
);
let is_hovered = state.state.downcast_ref::<State>().is_hovered;
let _is_hovered = state.state.downcast_ref::<State>().is_hovered;
let mut node = Node::new(Role::Button);
node.add_action(Action::Focus);

View file

@ -536,7 +536,7 @@ where
};
let bounds = layout.bounds();
let is_hovered = cursor.is_over(bounds);
let _is_hovered = cursor.is_over(bounds);
let Rectangle {
x,
y,

View file

@ -35,7 +35,7 @@ use crate::core::{
color,
};
use iced_runtime::{Action, Task, task};
use iced_runtime::{Task, task};
/// A widget that aligns its contents inside of its boundaries.
///

View file

@ -293,8 +293,8 @@ fn drawing_bounds<Renderer, Handle>(
content_fit: ContentFit,
rotation: Rotation,
scale: f32,
opacity: f32,
border_radius: [f32; 4],
_opacity: f32,
_border_radius: [f32; 4],
) -> Rectangle
where
Renderer: image::Renderer<Handle = Handle>,

View file

@ -1,7 +1,6 @@
//! Keyed columns distribute content vertically while keeping continuity.
//! Distribute content vertically.
use crate::core::event;
use crate::core::layout;
use crate::core::mouse;
use crate::core::overlay;

View file

@ -15,7 +15,7 @@ use crate::core::mouse;
use crate::core::overlay;
use crate::core::renderer;
use crate::core::widget::tree::{self, Tree};
use crate::core::widget::{self, Widget};
use crate::core::widget::Widget;
use crate::core::{
self, Clipboard, Event, Length, Rectangle, Shell, Size, Vector,
};

View file

@ -527,11 +527,11 @@ where
renderer: &Renderer,
dnd_rectangles: &mut core::clipboard::DndDestinationRectangles,
) {
let mut tree = tree
let tree = tree
.state
.downcast_ref::<Rc<RefCell<Option<Tree>>>>()
.borrow_mut();
let mut tree = tree.as_ref().unwrap();
let tree = tree.as_ref().unwrap();
self.with_element(|element| {
element.as_widget().drag_destinations(
&tree.children[0],

View file

@ -1,5 +1,5 @@
#![allow(missing_docs)]
use crate::core::event::{self, Event};
use crate::core::event::Event;
use crate::core::layout;
use crate::core::mouse;
use crate::core::overlay;

View file

@ -2,7 +2,6 @@
use iced_renderer::core::mouse::Click;
use crate::core::event;
use crate::core::layout;
use crate::core::mouse;
use crate::core::overlay;

View file

@ -6,7 +6,7 @@ use crate::core::renderer;
use crate::core::widget::{self, Tree};
use crate::core::{
self, Clipboard, Element, Event, Layout, Point, Rectangle, Shell, Size,
Vector, event,
Vector,
};
use crate::pane_grid::{Draggable, TitleBar};

View file

@ -27,7 +27,6 @@ use iced_runtime::core::widget::Id;
#[cfg(feature = "a11y")]
use std::borrow::Cow;
use crate::core::event;
use crate::core::keyboard;
use crate::core::layout;
use crate::core::mouse;
@ -933,7 +932,7 @@ where
let had_input_method = shell.input_method().is_enabled();
let mut c_event = match event.clone() {
let c_event = match event.clone() {
Event::Dnd(dnd::DndEvent::Offer(
id,
dnd::OfferEvent::Enter {
@ -1586,7 +1585,7 @@ where
return A11yTree::default();
}
let window = layout.bounds();
let is_hovered = cursor.is_over(window);
let _is_hovered = cursor.is_over(window);
let Rectangle {
x,
y,
@ -1670,7 +1669,7 @@ where
}))
{
let scrollbar_bounds = scrollbar.total_bounds;
let is_hovered = cursor.is_over(scrollbar_bounds);
let _is_hovered = cursor.is_over(scrollbar_bounds);
let Rectangle {
x,
y,

View file

@ -695,7 +695,7 @@ where
};
let bounds = layout.bounds();
let is_hovered = cursor.is_over(bounds);
let _is_hovered = cursor.is_over(bounds);
let Rectangle {
x,
y,

View file

@ -1,6 +1,5 @@
//! Display content on top of other content.
use crate::core::event;
use crate::core::layout;
use crate::core::mouse;
use crate::core::overlay;

View file

@ -31,7 +31,6 @@ use crate::core::{
#[cfg(feature = "a11y")]
use std::borrow::Cow;
use std::marker::PhantomData;
use std::path::PathBuf;
pub use crate::core::svg::Handle;

View file

@ -1,6 +1,5 @@
use crate::container;
use crate::core::event;
use crate::core::layout;
use crate::core::mouse;
use crate::core::overlay;

View file

@ -37,7 +37,6 @@ use std::borrow::Cow;
use iced_runtime::core::border::Radius;
use crate::core::alignment;
use crate::core::border;
use crate::core::layout;
use crate::core::mouse;
use crate::core::renderer;
@ -509,7 +508,7 @@ where
let space = style.handle_margin;
let toggler_background_bounds = Rectangle {
let _toggler_background_bounds = Rectangle {
x: bounds.x,
y: bounds.y,
width: bounds.width,
@ -529,7 +528,7 @@ where
style.background,
);
let padding = (style.padding_ratio * bounds.height).round();
let _padding = (style.padding_ratio * bounds.height).round();
let toggler_foreground_bounds = Rectangle {
x: bounds.x
+ if self.is_toggled {
@ -570,7 +569,7 @@ where
};
let bounds = layout.bounds();
let is_hovered = cursor.is_over(bounds);
let _is_hovered = cursor.is_over(bounds);
let Rectangle {
x,
y,