chore: apply recommendations from clippy

This commit is contained in:
Cheong Lau 2025-10-04 10:51:18 +10:00 • committed by GitHub
parent cec55dafd7
commit 8e0f1c4a09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
56 changed files with 720 additions and 824 deletions

View file

@ -235,7 +235,7 @@ impl cosmic::Application for CosmicA11yApplet {
});
} else {
tracing::error!("Wayland tx is None");
};
}
}
Message::Token(u) => match u {
TokenUpdate::Init(tx) => {
@ -303,7 +303,7 @@ impl cosmic::Application for CosmicA11yApplet {
Task::none()
}
fn view(&self) -> Element<Message> {
fn view(&self) -> Element<'_, Message> {
self.core
.applet
.icon_button("preferences-desktop-accessibility-symbolic")
@ -311,7 +311,7 @@ impl cosmic::Application for CosmicA11yApplet {
.into()
}
fn view_window(&self, _id: window::Id) -> Element<Message> {
fn view_window(&self, _id: window::Id) -> Element<'_, Message> {
let Spacing {
space_xxs, space_s, ..
} = theme::active().cosmic().spacing;

View file

@ -82,6 +82,6 @@ pub struct WaylandWatcher {
impl WaylandWatcher {
pub fn new() -> anyhow::Result<Self> {
let (tx, rx) = thread::spawn_wayland_connection(1)?;
Ok(Self { tx, rx })
Ok(Self { rx, tx })
}
}

View file

@ -43,6 +43,6 @@ pub fn localize() {
let requested_languages = i18n_embed::DesktopLanguageRequester::requested_languages();
if let Err(error) = localizer.select(&requested_languages) {
eprintln!("Error while loading language for App List {}", error);
eprintln!("Error while loading language for App List {error}");
}
}