From db595c13f095afd9ccee47cfd7564609ef0a38a8 Mon Sep 17 00:00:00 2001 From: MrDulfin Date: Mon, 26 May 2025 13:50:27 -0400 Subject: [PATCH] updated crates to rust 2024 edition --- dmp-core/Cargo.toml | 4 ++-- dmp-core/src/music_storage/library.rs | 8 ++++---- dmp-core/src/music_storage/playlist.rs | 4 ++-- src-tauri/Cargo.toml | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dmp-core/Cargo.toml b/dmp-core/Cargo.toml index 2620905..ea485db 100644 --- a/dmp-core/Cargo.toml +++ b/dmp-core/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dmp-core" version = "0.0.0" -edition = "2021" +edition = "2024" license = "AGPL-3.0-only" description = "Backend crate for the Dango Music Player " homepage = "" @@ -36,7 +36,7 @@ futures = "0.3.30" async-channel = "2.3.1" ciborium = "0.2.2" itertools = "0.13.0" -prismriver = { git = "https://github.com/Dangoware/prismriver.git" } +prismriver = { git = "https://github.com/Dangoware/prismriver.git", features = [] } parking_lot = "0.12.3" discord-presence = { version = "1.4.1", features = ["activity_type"] } listenbrainz = "0.8.1" diff --git a/dmp-core/src/music_storage/library.rs b/dmp-core/src/music_storage/library.rs index b7e1060..55707c7 100644 --- a/dmp-core/src/music_storage/library.rs +++ b/dmp-core/src/music_storage/library.rs @@ -25,7 +25,7 @@ use uuid::Uuid; use walkdir::WalkDir; // Time -use chrono::{serde::ts_milliseconds_option, DateTime, Utc}; +use chrono::{DateTime, Utc, serde::ts_milliseconds_option}; use std::time::Duration; // Serialization/Compression @@ -267,7 +267,7 @@ impl Song { ItemKey::Unknown(unknown) if unknown == "ACOUSTID_FINGERPRINT" || unknown == "Acoustid Fingerprint" => { - continue + continue; } ItemKey::Unknown(unknown) => Tag::Key(unknown.to_string()), custom => Tag::Key(format!("{:?}", custom)), @@ -486,7 +486,7 @@ impl Song { .to_vec(), )) } - AlbumArt::External(ref path) => { + AlbumArt::External(path) => { let mut buf = vec![]; std::fs::File::open(path.path())?.read_to_end(&mut buf)?; Ok(Some(buf)) @@ -962,7 +962,7 @@ impl MusicLibrary { match location { URI::Local(_) if self.query_path(location.path()).is_some() => { - return Err(format!("Location exists for {:?}", location).into()) + return Err(format!("Location exists for {:?}", location).into()); } _ => (), } diff --git a/dmp-core/src/music_storage/playlist.rs b/dmp-core/src/music_storage/playlist.rs index 4155d7b..3aab7c5 100644 --- a/dmp-core/src/music_storage/playlist.rs +++ b/dmp-core/src/music_storage/playlist.rs @@ -45,7 +45,7 @@ impl PlaylistFolder { for item in &self.items { match item { PlaylistFolderItem::Folder(folder) => return folder.query_uuid(uuid), - PlaylistFolderItem::List(ref playlist) => { + PlaylistFolderItem::List(playlist) => { if &playlist.uuid == uuid { return Some(playlist); } @@ -59,7 +59,7 @@ impl PlaylistFolder { let mut vec = vec![]; for item in &self.items { match item { - PlaylistFolderItem::List(ref playlist) => vec.push(playlist), + PlaylistFolderItem::List(playlist) => vec.push(playlist), PlaylistFolderItem::Folder(folder) => vec.append(&mut folder.lists_recursive()), } } diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index e57d7cc..5c508a6 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -3,7 +3,7 @@ name = "dango-music-player" version = "0.1.0" description = "A music player." authors = ["G2", "MrDulfin"] -edition = "2021" +edition = "2024" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html