yoda: cargo fix --lib across all crates — drop ~115 trivial warnings

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 committed by Lionel DARNIS
parent 125e43a203
commit c6b0d3543b
45 changed files with 83 additions and 137 deletions

View file

@ -3,7 +3,6 @@
//! [`winit`]: https://github.com/rust-windowing/winit
//! [`iced_runtime`]: https://github.com/iced-rs/iced/tree/0.14/runtime
use crate::core::input_method;
use std::hash::DefaultHasher;
use std::hash::Hash;
use std::hash::Hasher;
use std::sync::Arc;
@ -14,7 +13,6 @@ use crate::core::theme;
use crate::core::touch;
use crate::core::window;
use crate::core::{Event, Point, Size};
use iced_futures::core::event::PlatformSpecific;
use winit::dpi::PhysicalPosition;
use winit::event::ButtonSource;
use winit::event::ElementState;
@ -27,7 +25,7 @@ use winit::keyboard::SmolStr;
pub fn window_attributes(
settings: window::Settings,
title: &str,
scale_factor: f64,
_scale_factor: f64,
primary_monitor: Option<winit::monitor::MonitorHandle>,
_id: Option<String>,
) -> winit::window::WindowAttributes {
@ -396,8 +394,8 @@ pub fn window_event(
Ime::Commit(content) => input_method::Event::Commit(content),
Ime::Disabled => input_method::Event::Closed,
Ime::DeleteSurrounding {
before_bytes,
after_bytes,
before_bytes: _,
after_bytes: _,
} => todo!(),
})),
WindowEvent::Focused(focused) => Some(Event::Window(if focused {
@ -411,7 +409,7 @@ pub fn window_event(
WindowEvent::DragDropped { paths, .. } => {
Some(Event::Window(window::Event::FileDropped(paths.clone())))
}
WindowEvent::DragLeft { position } => {
WindowEvent::DragLeft { position: _ } => {
Some(Event::Window(window::Event::FilesHoveredLeft))
}
@ -707,7 +705,7 @@ enum TouchInternal {
pub fn touch_event(
finger: FingerId,
state: TouchInternal,
force: Option<Force>,
_force: Option<Force>,
position: Option<PhysicalPosition<f64>>,
scale_factor: f64,
) -> touch::Event {