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

@ -1,35 +1,34 @@
// Copyright 2023 System76 <info@system76.com>
// SPDX-License-Identifier: GPL-3.0-only
use crate::bluetooth::{set_tick, BluerDeviceStatus, BluerRequest, BluerState, DeviceProperty};
use crate::bluetooth::{BluerDeviceStatus, BluerRequest, BluerState, set_tick};
use cosmic::{
app,
applet::token::subscription::{activation_token_subscription, TokenRequest, TokenUpdate},
applet::token::subscription::{TokenRequest, TokenUpdate, activation_token_subscription},
cctk::sctk::reexports::calloop,
surface,
};
use cosmic::{
Element, Task,
applet::{menu_button, padded_control},
cosmic_theme::Spacing,
iced::{
self,
self, Alignment, Length, Subscription,
platform_specific::shell::wayland::commands::popup::{destroy_popup, get_popup},
widget::{column, container, row, scrollable, Column},
Alignment, Length, Subscription,
widget::{Column, column, container, row},
},
iced_runtime::core::{layout::Limits, window},
iced_runtime::core::window,
theme,
widget::{button, divider, icon, text},
Element, Task,
widget::{button, divider, icon, scrollable, text},
};
use cosmic_time::{anim, chain, id, Instant, Timeline};
use cosmic_time::{Instant, Timeline, anim, chain, id};
use futures::FutureExt;
use std::{collections::HashMap, sync::LazyLock, time::Duration};
use tokio::sync::mpsc::Sender;
use crate::{
bluetooth::{bluetooth_subscription, BluerDevice, BluerEvent},
bluetooth::{BluerDevice, BluerEvent, bluetooth_subscription},
config, fl,
};

View file

@ -10,28 +10,26 @@ use std::{
time::Duration,
};
pub use bluer::DeviceProperty;
use bluer::{
agent::{Agent, AgentHandle},
Adapter, Address, Session, Uuid,
agent::{Agent, AgentHandle},
};
use cosmic::{
iced::{
self,
self, Subscription,
futures::{SinkExt, StreamExt},
Subscription,
},
iced_futures::stream,
};
use futures::{stream::FuturesUnordered, FutureExt};
use futures::{FutureExt, stream::FuturesUnordered};
use rand::Rng;
use tokio::{
spawn,
sync::{
mpsc::{channel, Receiver, Sender},
Mutex, RwLock,
mpsc::{Receiver, Sender, channel},
},
task::JoinHandle,
};

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;