chore: Rust 2024 edition
This commit is contained in:
parent
3b86984332
commit
c31a46961a
31 changed files with 48 additions and 48 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue