mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Clean up dependencies in librespot-metadata
* Replaced LinearMap by HashMap * Removed unnecessary dependencies * Removed "extern crate"s
This commit is contained in:
parent
10827bd6a8
commit
a6ed6857d2
3 changed files with 6 additions and 22 deletions
8
Cargo.lock
generated
8
Cargo.lock
generated
|
@ -1485,10 +1485,8 @@ version = "0.1.6"
|
|||
dependencies = [
|
||||
"async-trait",
|
||||
"byteorder",
|
||||
"futures",
|
||||
"librespot-core",
|
||||
"librespot-protocol",
|
||||
"linear-map",
|
||||
"log",
|
||||
"protobuf",
|
||||
]
|
||||
|
@ -1542,12 +1540,6 @@ dependencies = [
|
|||
"pkg-config",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "linear-map"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bfae20f6b19ad527b550c223fddc3077a547fc70cda94b9b566575423fd303ee"
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
version = "0.4.2"
|
||||
|
|
|
@ -10,8 +10,6 @@ edition = "2018"
|
|||
[dependencies]
|
||||
async-trait = "0.1"
|
||||
byteorder = "1.3"
|
||||
futures = "0.3"
|
||||
linear-map = "1.2"
|
||||
protobuf = "~2.14.0"
|
||||
log = "0.4"
|
||||
|
||||
|
|
|
@ -1,26 +1,20 @@
|
|||
#![allow(clippy::unused_io_amount)]
|
||||
#![allow(clippy::redundant_field_names)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
#[macro_use]
|
||||
extern crate async_trait;
|
||||
|
||||
extern crate byteorder;
|
||||
extern crate futures;
|
||||
extern crate linear_map;
|
||||
extern crate protobuf;
|
||||
|
||||
extern crate librespot_core;
|
||||
extern crate librespot_protocol as protocol;
|
||||
|
||||
pub mod cover;
|
||||
|
||||
use linear_map::LinearMap;
|
||||
use std::collections::HashMap;
|
||||
|
||||
use librespot_core::mercury::MercuryError;
|
||||
use librespot_core::session::Session;
|
||||
use librespot_core::spotify_id::{FileId, SpotifyAudioType, SpotifyId};
|
||||
use librespot_protocol as protocol;
|
||||
|
||||
pub use crate::protocol::metadata::AudioFile_Format as FileFormat;
|
||||
|
||||
|
@ -64,7 +58,7 @@ where
|
|||
pub struct AudioItem {
|
||||
pub id: SpotifyId,
|
||||
pub uri: String,
|
||||
pub files: LinearMap<FileFormat, FileId>,
|
||||
pub files: HashMap<FileFormat, FileId>,
|
||||
pub name: String,
|
||||
pub duration: i32,
|
||||
pub available: bool,
|
||||
|
@ -143,7 +137,7 @@ pub struct Track {
|
|||
pub duration: i32,
|
||||
pub album: SpotifyId,
|
||||
pub artists: Vec<SpotifyId>,
|
||||
pub files: LinearMap<FileFormat, FileId>,
|
||||
pub files: HashMap<FileFormat, FileId>,
|
||||
pub alternatives: Vec<SpotifyId>,
|
||||
pub available: bool,
|
||||
}
|
||||
|
@ -165,7 +159,7 @@ pub struct Episode {
|
|||
pub duration: i32,
|
||||
pub language: String,
|
||||
pub show: SpotifyId,
|
||||
pub files: LinearMap<FileFormat, FileId>,
|
||||
pub files: HashMap<FileFormat, FileId>,
|
||||
pub covers: Vec<FileId>,
|
||||
pub available: bool,
|
||||
pub explicit: bool,
|
||||
|
|
Loading…
Reference in a new issue