chore: Rust 2024 edition
This commit is contained in:
parent
3b86984332
commit
c31a46961a
31 changed files with 48 additions and 48 deletions
|
|
@ -1,8 +1,4 @@
|
|||
edition = "2021"
|
||||
edition = "2024"
|
||||
hard_tabs = true
|
||||
merge_derives = true
|
||||
newline_style = "Unix"
|
||||
remove_nested_parens = true
|
||||
reorder_imports = true
|
||||
reorder_modules = true
|
||||
use_field_init_shorthand = true
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cosmic-dbus-a11y"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
zbus.workspace = true
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "accounts-zbus"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "MPL-2.0"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ name = "bluez-zbus"
|
|||
version = "0.1.0"
|
||||
description = "dbus bindings for org.bluez with zbus"
|
||||
repository = "https://github.com/pop-os/dbus-settings-bindings"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "MPL-2.0"
|
||||
categories = ["os::linux-apis"]
|
||||
keywords = ["dbus", "bluez", "zbus", "bluetooth"]
|
||||
|
|
|
|||
|
|
@ -32,5 +32,5 @@ pub trait HealthManager1 {
|
|||
|
||||
/// DestroyApplication method
|
||||
fn destroy_application(&self, application: &zbus::zvariant::ObjectPath<'_>)
|
||||
-> zbus::Result<()>;
|
||||
-> zbus::Result<()>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,9 @@ pub async fn get_adapters<'a>(
|
|||
.filter_map(std::result::Result::err)
|
||||
.collect();
|
||||
if errors.len() > 1 {
|
||||
eprintln!("Multiple errors occurs when fetching connected device: {errors:?}. Only the last one will be returned.");
|
||||
eprintln!(
|
||||
"Multiple errors occurs when fetching connected device: {errors:?}. Only the last one will be returned."
|
||||
);
|
||||
}
|
||||
return Err(errors.pop().unwrap());
|
||||
}
|
||||
|
|
@ -165,7 +167,9 @@ pub async fn get_devices<'a>(
|
|||
.filter_map(std::result::Result::err)
|
||||
.collect();
|
||||
if errors.len() > 1 {
|
||||
eprintln!("Multiple errors occurs when fetching connected device: {errors:?}. Only the last one will be returned.");
|
||||
eprintln!(
|
||||
"Multiple errors occurs when fetching connected device: {errors:?}. Only the last one will be returned."
|
||||
);
|
||||
}
|
||||
return Err(errors.pop().unwrap());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cosmic-settings-daemon"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
|
@ -12,4 +12,4 @@ zbus.workspace = true
|
|||
futures = "0.3"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
zbus.workspace = true
|
||||
zbus.features = ["tokio"]
|
||||
zbus.features = ["tokio"]
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
name = "geoclue2"
|
||||
description = "zbus-based bindings for GeoClue2 on Linux"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "MPL-2.0"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
|
@ -10,4 +10,4 @@ license = "MPL-2.0"
|
|||
[dependencies]
|
||||
serde.workspace = true
|
||||
serde_repr = "0.1.18"
|
||||
zbus.workspace = true
|
||||
zbus.workspace = true
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
use serde_repr::{Deserialize_repr, Serialize_repr};
|
||||
use zbus::{
|
||||
proxy,
|
||||
Result, proxy,
|
||||
zvariant::{ObjectPath, OwnedValue, Type},
|
||||
Result,
|
||||
};
|
||||
|
||||
#[repr(u32)]
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ name = "hostname1-zbus"
|
|||
version = "0.1.0"
|
||||
description = "dbus bindings for org.freedesktop.hostname1 with zbus"
|
||||
repository = "https://github.com/pop-os/dbus-settings-bindings"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "MPL-2.0"
|
||||
categories = ["os::linux-apis"]
|
||||
keywords = ["dbus", "hostname", "hostname1", "zbus", "freedesktop"]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "locale1"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
zbus.workspace = true
|
||||
|
|
@ -10,4 +10,4 @@ zbus.workspace = true
|
|||
futures = "0.3"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
zbus.workspace = true
|
||||
zbus.features = ["tokio"]
|
||||
zbus.features = ["tokio"]
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
name = "mpris2-zbus"
|
||||
description = "zbus-based bindings for MPRIS2 (Media Player Remote Interfacing Specification) on Linux"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "MPL-2.0"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ use zbus::proxy;
|
|||
pub trait TrackList {
|
||||
/// AddTrack method
|
||||
fn add_track(&self, uri: &str, after_track: &TrackId, set_as_current: bool)
|
||||
-> zbus::Result<()>;
|
||||
-> zbus::Result<()>;
|
||||
|
||||
/// GetTracksMetadata method
|
||||
fn get_tracks_metadata(
|
||||
|
|
@ -46,7 +46,7 @@ pub trait TrackList {
|
|||
/// TrackListReplaced signal
|
||||
#[zbus(signal)]
|
||||
fn track_list_replaced(&self, tracks: Vec<TrackId>, current_track: TrackId)
|
||||
-> zbus::Result<()>;
|
||||
-> zbus::Result<()>;
|
||||
|
||||
/// CanEditTracks property
|
||||
#[zbus(property)]
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use futures_util::{
|
||||
stream::{self, StreamExt},
|
||||
Stream,
|
||||
stream::{self, StreamExt},
|
||||
};
|
||||
use zbus::{fdo::DBusProxy, names::OwnedBusName, Connection};
|
||||
use zbus::{Connection, fdo::DBusProxy, names::OwnedBusName};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum Event {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use crate::{
|
|||
track_list::TrackList,
|
||||
};
|
||||
use std::ops::Deref;
|
||||
use zbus::{names::OwnedBusName, Connection};
|
||||
use zbus::{Connection, names::OwnedBusName};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct MediaPlayer {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use std::{
|
|||
str::FromStr,
|
||||
};
|
||||
use time::Duration;
|
||||
use zbus::{names::OwnedBusName, Connection};
|
||||
use zbus::{Connection, names::OwnedBusName};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Player {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use crate::{
|
|||
error::{Error, Result},
|
||||
};
|
||||
use std::ops::Deref;
|
||||
use zbus::{names::OwnedBusName, Connection};
|
||||
use zbus::{Connection, names::OwnedBusName};
|
||||
|
||||
pub struct Playlists {
|
||||
proxy: PlaylistsProxy<'static>,
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@ pub struct Playlist((PlaylistId, String, String));
|
|||
|
||||
impl Playlist {
|
||||
pub fn id(&self) -> &PlaylistId {
|
||||
&self.0 .0
|
||||
&self.0.0
|
||||
}
|
||||
|
||||
pub fn name(&self) -> &str {
|
||||
&self.0 .1
|
||||
&self.0.1
|
||||
}
|
||||
|
||||
pub fn icon(&self) -> &str {
|
||||
&self.0 .2
|
||||
&self.0.2
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use crate::{
|
|||
track::TrackId,
|
||||
};
|
||||
use std::{collections::BTreeMap, ops::Deref};
|
||||
use zbus::{names::OwnedBusName, Connection};
|
||||
use zbus::{Connection, names::OwnedBusName};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct TrackList {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cosmic-dbus-networkmanager"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "MPL-2.0"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -13,8 +13,9 @@ use crate::{
|
|||
active_connection::ActiveConnectionProxy,
|
||||
config::{ip4::Ipv4ConfigProxy, ip6::Ipv6ConfigProxy},
|
||||
device::{
|
||||
bluetooth::BluetoothDeviceProxy, tun::TunDeviceProxy, wired::WiredDeviceProxy,
|
||||
wireguard::WireGuardDeviceProxy, wireless::WirelessDeviceProxy, DeviceProxy,
|
||||
DeviceProxy, bluetooth::BluetoothDeviceProxy, tun::TunDeviceProxy,
|
||||
wired::WiredDeviceProxy, wireguard::WireGuardDeviceProxy,
|
||||
wireless::WirelessDeviceProxy,
|
||||
},
|
||||
enums::{DeviceCapabilities, DeviceState, DeviceType},
|
||||
settings::connection::ConnectionSettingsProxy,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use super::Device;
|
||||
use crate::interface::device::{bluetooth::BluetoothDeviceProxy, DeviceProxy};
|
||||
use crate::interface::device::{DeviceProxy, bluetooth::BluetoothDeviceProxy};
|
||||
use std::ops::Deref;
|
||||
use zbus::Result;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use super::Device;
|
||||
use crate::interface::device::{tun::TunDeviceProxy, DeviceProxy};
|
||||
use crate::interface::device::{DeviceProxy, tun::TunDeviceProxy};
|
||||
use std::ops::Deref;
|
||||
use zbus::Result;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use super::Device;
|
||||
use crate::interface::device::{wired::WiredDeviceProxy, DeviceProxy};
|
||||
use crate::interface::device::{DeviceProxy, wired::WiredDeviceProxy};
|
||||
use std::ops::Deref;
|
||||
use zbus::Result;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use super::Device;
|
||||
use crate::interface::device::{wireguard::WireGuardDeviceProxy, DeviceProxy};
|
||||
use crate::interface::device::{DeviceProxy, wireguard::WireGuardDeviceProxy};
|
||||
use std::ops::Deref;
|
||||
use zbus::Result;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use crate::{
|
|||
access_point::AccessPoint,
|
||||
interface::{
|
||||
access_point::AccessPointProxy,
|
||||
device::{wireless::WirelessDeviceProxy, DeviceProxy},
|
||||
device::{DeviceProxy, wireless::WirelessDeviceProxy},
|
||||
enums::{WifiCapabilities, WifiMode},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,15 +4,15 @@ use crate::{
|
|||
active_connection::ActiveConnection,
|
||||
device::Device,
|
||||
interface::{
|
||||
NetworkManagerProxy,
|
||||
active_connection::ActiveConnectionProxy,
|
||||
device::DeviceProxy,
|
||||
enums::{NmConnectivityState, NmState},
|
||||
NetworkManagerProxy,
|
||||
},
|
||||
settings::{connection::Connection, NetworkManagerSettings},
|
||||
settings::{NetworkManagerSettings, connection::Connection},
|
||||
};
|
||||
use std::ops::Deref;
|
||||
use zbus::{zvariant::ObjectPath, Result};
|
||||
use zbus::{Result, zvariant::ObjectPath};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct NetworkManager<'a>(NetworkManagerProxy<'a>);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
pub mod connection;
|
||||
|
||||
use self::connection::Connection;
|
||||
use crate::interface::settings::{connection::ConnectionSettingsProxy, SettingsProxy};
|
||||
use crate::interface::settings::{SettingsProxy, connection::ConnectionSettingsProxy};
|
||||
use std::ops::Deref;
|
||||
use zbus::Result;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "switcheroo-control"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
|
@ -12,4 +12,4 @@ zbus.workspace = true
|
|||
futures = "0.3"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
zbus.workspace = true
|
||||
zbus.features = ["tokio"]
|
||||
zbus.features = ["tokio"]
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ version = "0.1.0"
|
|||
description = "a dbus client (using zbus) for timedate"
|
||||
repository = "https://github.com/pop-os/dbus-settings-bindings"
|
||||
license = "MPL-2.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
categories = ["os::unix-apis"]
|
||||
keywords = ["systemd", "timedate", "zbus"]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ readme = "README.md"
|
|||
license = "MIT"
|
||||
categories = ["os::unix-apis"]
|
||||
keywords = ["linux", "systemd", "logind", "dbus", "zbus"]
|
||||
edition = "2018"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
serde.workspace = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue