chore: Rust 2024 edition

This commit is contained in:
Vukašin Vojinović 2025-10-05 13:45:37 +02:00 committed by Michael Murphy
parent 3b86984332
commit c31a46961a
31 changed files with 48 additions and 48 deletions

View file

@ -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]

View file

@ -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)]

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {

View file

@ -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>,

View file

@ -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
}
}

View file

@ -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 {