chore: update to Rust 2024 edition

This commit is contained in:
Vukašin Vojinović 2025-08-12 21:38:51 +02:00 committed by Michael Murphy
parent c3fafd3910
commit 2b7b4cba56
71 changed files with 254 additions and 292 deletions

View file

@ -2,8 +2,8 @@
// SPDX-License-Identifier: GPL-3.0-only
use i18n_embed::{
fluent::{fluent_language_loader, FluentLanguageLoader},
DefaultLocalizer, LanguageLoader, Localizer,
fluent::{FluentLanguageLoader, fluent_language_loader},
};
use rust_embed::RustEmbed;
use std::sync::LazyLock;

View file

@ -19,7 +19,7 @@ use cctk::{
};
use cosmic::iced::futures;
use cosmic_protocols::workspace::v2::client::zcosmic_workspace_handle_v2::TilingState;
use futures::{channel::mpsc, executor::block_on, SinkExt};
use futures::{SinkExt, channel::mpsc, executor::block_on};
use std::{
collections::HashSet,
os::{
@ -29,9 +29,9 @@ use std::{
};
use tracing::error;
use wayland_client::{
Connection, QueueHandle,
globals::registry_queue_init,
protocol::wl_output::{self, WlOutput},
Connection, QueueHandle,
};
#[derive(Debug, Clone)]

View file

@ -4,9 +4,9 @@
use crate::wayland::{self, AppRequest};
use cctk::sctk::reexports::calloop::channel::SyncSender;
use cosmic::iced::{
self,
futures::{self, channel::mpsc, SinkExt, StreamExt},
stream, Subscription,
self, Subscription,
futures::{self, SinkExt, StreamExt, channel::mpsc},
stream,
};
use cosmic_protocols::workspace::v2::client::zcosmic_workspace_handle_v2::TilingState;
use std::sync::LazyLock;

View file

@ -6,15 +6,15 @@ use crate::{
};
use cctk::sctk::reexports::calloop::channel::SyncSender;
use cosmic::{
app,
Element, Task, app,
app::Core,
applet::{menu_button, padded_control},
cosmic_config::{Config, ConfigSet, CosmicConfigEntry},
cosmic_theme::Spacing,
iced::{
Length, Subscription,
platform_specific::shell::wayland::commands::popup::{destroy_popup, get_popup},
window::Id,
Length, Limits, Subscription,
},
iced_widget::{column, row},
surface, theme,
@ -23,11 +23,10 @@ use cosmic::{
segmented_button::{self, Entity, SingleSelectModel},
segmented_control, text,
},
Element, Task,
};
use cosmic_comp_config::{CosmicCompConfig, TileBehavior};
use cosmic_protocols::workspace::v2::client::zcosmic_workspace_handle_v2::TilingState;
use cosmic_time::{anim, chain, id, Timeline};
use cosmic_time::{Timeline, anim, chain, id};
use std::{thread, time::Instant};
use tracing::error;
@ -173,7 +172,7 @@ impl cosmic::Application for Window {
self.active_hint = id::Toggler::unique();
let new_id = Id::unique();
self.popup = Some(new_id);
let mut popup_settings = self.core.applet.get_popup_settings(
let popup_settings = self.core.applet.get_popup_settings(
self.core.main_window_id().unwrap(),
new_id,
Some((1, 1)),
@ -182,7 +181,7 @@ impl cosmic::Application for Window {
);
get_popup(popup_settings)
}
};
}
Message::PopupClosed(id) => {
if self.popup.as_ref() == Some(&id) {