From 13241496abaad09e9b9f1124c8d05cdb1fda6ef1 Mon Sep 17 00:00:00 2001 From: awiouy Date: Mon, 12 Feb 2018 20:09:59 +0100 Subject: [PATCH 1/9] Cargo.lock --- Cargo.lock | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1441ac07..54be236b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -327,7 +327,7 @@ dependencies = [ "protobuf_macros 0.6.0 (git+https://github.com/plietar/rust-protobuf-macros)", "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", "rpassword 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-crypto 0.2.36 (git+https://github.com/awmath/rust-crypto.git?branch=avx2)", + "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -350,7 +350,7 @@ dependencies = [ "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "num-bigint 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-crypto 0.2.36 (git+https://github.com/awmath/rust-crypto.git?branch=avx2)", + "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "tremor 0.1.0 (git+https://github.com/plietar/rust-tremor)", "vorbis 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -373,7 +373,7 @@ dependencies = [ "protobuf 1.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf_macros 0.6.0 (git+https://github.com/plietar/rust-protobuf-macros)", "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-crypto 0.2.36 (git+https://github.com/awmath/rust-crypto.git?branch=avx2)", + "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -400,7 +400,7 @@ dependencies = [ "protobuf 1.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", "rpassword 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-crypto 0.2.36 (git+https://github.com/awmath/rust-crypto.git?branch=avx2)", + "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -737,6 +737,12 @@ dependencies = [ "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rust-crypto" +version = "0.2.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +replace = "rust-crypto 0.2.36 (git+https://github.com/awmath/rust-crypto.git?branch=avx2)" + [[package]] name = "rustc-serialize" version = "0.3.24" @@ -1245,6 +1251,7 @@ dependencies = [ "checksum relay 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f301bafeb60867c85170031bdb2fcf24c8041f33aee09e7b116a58d4e9f781c5" "checksum rpassword 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ec4bdede957362ec6fdd550f7e79c6d14cad2bc26b2d062786234c6ee0cb27bb" "checksum rust-crypto 0.2.36 (git+https://github.com/awmath/rust-crypto.git?branch=avx2)" = "" +"checksum rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" "checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" "checksum scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f417c22df063e9450888a7561788e9bd46d3bb3c1466435b4eccb903807f147d" From 0fd398e34db561a96a64958e7561f2e0f4981d49 Mon Sep 17 00:00:00 2001 From: awiouy Date: Mon, 12 Feb 2018 20:10:36 +0100 Subject: [PATCH 2/9] core API: SessionData --- core/src/session.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/session.rs b/core/src/session.rs index 628e0377..a702f191 100644 --- a/core/src/session.rs +++ b/core/src/session.rs @@ -19,7 +19,7 @@ use audio_key::AudioKeyManager; use channel::ChannelManager; use mercury::MercuryManager; -pub struct SessionData { +struct SessionData { country: String, canonical_username: String, } From aed4fe32d855be0ac6f0d709d725d6ea08043f11 Mon Sep 17 00:00:00 2001 From: awiouy Date: Mon, 12 Feb 2018 20:13:37 +0100 Subject: [PATCH 3/9] core API: SessionInternal --- core/src/session.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/session.rs b/core/src/session.rs index a702f191..cb210a0f 100644 --- a/core/src/session.rs +++ b/core/src/session.rs @@ -24,7 +24,7 @@ struct SessionData { canonical_username: String, } -pub struct SessionInternal { +struct SessionInternal { config: SessionConfig, data: RwLock, @@ -43,7 +43,7 @@ pub struct SessionInternal { static SESSION_COUNTER: AtomicUsize = ATOMIC_USIZE_INIT; #[derive(Clone)] -pub struct Session(pub Arc); +pub struct Session(Arc); pub fn device_id(name: &str) -> String { let mut h = Sha1::new(); @@ -226,7 +226,7 @@ impl Session { } #[derive(Clone)] -pub struct SessionWeak(pub Weak); +pub struct SessionWeak(Weak); impl SessionWeak { fn try_upgrade(&self) -> Option { From 6a9084b00c83268e6389a2359e10f1dbc05c620e Mon Sep 17 00:00:00 2001 From: awiouy Date: Mon, 12 Feb 2018 20:20:43 +0100 Subject: [PATCH 4/9] core API: Lazy --- core/src/component.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/component.rs b/core/src/component.rs index 923e72ec..29aef1bf 100644 --- a/core/src/component.rs +++ b/core/src/component.rs @@ -39,17 +39,17 @@ macro_rules! component { use std::cell::UnsafeCell; use std::sync::Mutex; -pub struct Lazy(Mutex, UnsafeCell>); +pub(crate) struct Lazy(Mutex, UnsafeCell>); unsafe impl Sync for Lazy {} unsafe impl Send for Lazy {} #[cfg_attr(feature = "cargo-clippy", allow(mutex_atomic))] impl Lazy { - pub fn new() -> Lazy { + pub(crate) fn new() -> Lazy { Lazy(Mutex::new(false), UnsafeCell::new(None)) } - pub fn get T>(&self, f: F) -> &T { + pub(crate) fn get T>(&self, f: F) -> &T { let mut inner = self.0.lock().unwrap(); if !*inner { unsafe { From 4c2b641cadb4adcf1b15ac03e2d94f394c4f135a Mon Sep 17 00:00:00 2001 From: awiouy Date: Mon, 12 Feb 2018 21:02:27 +0100 Subject: [PATCH 5/9] core API: move spotify_id to lib.rs --- audio/src/fetch.rs | 4 +- connect/src/spirc.rs | 3 +- core/src/audio_key.rs | 2 +- core/src/cache.rs | 2 +- core/src/lib.rs | 1 + core/src/{util => }/spotify_id.rs | 0 core/src/util/mod.rs | 2 - examples/play.rs | 2 +- metadata/src/cover.rs | 2 +- metadata/src/lib.rs | 116 +++++++++++++++--------------- playback/src/player.rs | 2 +- 11 files changed, 67 insertions(+), 69 deletions(-) rename core/src/{util => }/spotify_id.rs (100%) diff --git a/audio/src/fetch.rs b/audio/src/fetch.rs index f9bd11a9..1455f21b 100644 --- a/audio/src/fetch.rs +++ b/audio/src/fetch.rs @@ -11,7 +11,7 @@ use tempfile::NamedTempFile; use core::channel::{Channel, ChannelData, ChannelError, ChannelHeaders}; use core::session::Session; -use core::util::FileId; +use core::spotify_id::FileId; const CHUNK_SIZE: usize = 0x20000; @@ -115,7 +115,7 @@ impl Future for AudioFileOpenStreaming { if id == 0x3 { let size = BigEndian::read_u32(&data) as usize * 4; let file = self.finish(size); - + return Ok(Async::Ready(file)); } } diff --git a/connect/src/spirc.rs b/connect/src/spirc.rs index 704472d7..2b88249c 100644 --- a/connect/src/spirc.rs +++ b/connect/src/spirc.rs @@ -6,7 +6,8 @@ use protobuf::{self, Message}; use core::config::ConnectConfig; use core::mercury::MercuryError; use core::session::Session; -use core::util::{SeqGenerator, SpotifyId}; +use core::spotify_id::SpotifyId; +use core::util::SeqGenerator; use core::version; use protocol; diff --git a/core/src/audio_key.rs b/core/src/audio_key.rs index 2d4fb2ab..021b1dc8 100644 --- a/core/src/audio_key.rs +++ b/core/src/audio_key.rs @@ -5,7 +5,7 @@ use futures::sync::oneshot; use std::collections::HashMap; use std::io::Write; -use util::{FileId, SpotifyId}; +use spotify_id::{FileId, SpotifyId}; use util::SeqGenerator; #[derive(Debug, Hash, PartialEq, Eq, Copy, Clone)] diff --git a/core/src/cache.rs b/core/src/cache.rs index fb59c729..a5f89d5e 100644 --- a/core/src/cache.rs +++ b/core/src/cache.rs @@ -6,7 +6,7 @@ use std::path::Path; use std::path::PathBuf; use authentication::Credentials; -use util::FileId; +use spotify_id::FileId; #[derive(Clone)] pub struct Cache { diff --git a/core/src/lib.rs b/core/src/lib.rs index 207c7656..3c9be131 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -44,5 +44,6 @@ pub mod diffie_hellman; pub mod keymaster; pub mod mercury; pub mod session; +pub mod spotify_id; pub mod util; pub mod version; diff --git a/core/src/util/spotify_id.rs b/core/src/spotify_id.rs similarity index 100% rename from core/src/util/spotify_id.rs rename to core/src/spotify_id.rs diff --git a/core/src/util/mod.rs b/core/src/util/mod.rs index 66f2fe3f..32b058ad 100644 --- a/core/src/util/mod.rs +++ b/core/src/util/mod.rs @@ -6,10 +6,8 @@ use std::mem; use std::ops::{Mul, Rem, Shr}; mod int128; -mod spotify_id; pub use util::int128::u128; -pub use util::spotify_id::{FileId, SpotifyId}; pub fn rand_vec(rng: &mut G, size: usize) -> Vec { rng.gen_iter().take(size).collect() diff --git a/examples/play.rs b/examples/play.rs index 8c88ddbe..2c0b3282 100644 --- a/examples/play.rs +++ b/examples/play.rs @@ -7,7 +7,7 @@ use tokio_core::reactor::Core; use librespot::core::authentication::Credentials; use librespot::playback::config::{PlayerConfig, SessionConfig}; use librespot::core::session::Session; -use librespot::core::util::SpotifyId; +use librespot::core::spotify_id::SpotifyId; use librespot::audio_backend; use librespot::player::Player; diff --git a/metadata/src/cover.rs b/metadata/src/cover.rs index ea3c197b..0ef186a0 100644 --- a/metadata/src/cover.rs +++ b/metadata/src/cover.rs @@ -3,7 +3,7 @@ use std::io::Write; use core::channel::ChannelData; use core::session::Session; -use core::util::FileId; +use core::spotify_id::FileId; pub fn get(session: &Session, file: FileId) -> ChannelData { let (channel_id, channel) = session.channel().allocate(); diff --git a/metadata/src/lib.rs b/metadata/src/lib.rs index 2439ded6..664d9a22 100644 --- a/metadata/src/lib.rs +++ b/metadata/src/lib.rs @@ -13,7 +13,8 @@ use linear_map::LinearMap; use core::mercury::MercuryError; use core::session::Session; -use core::util::{SpotifyId, FileId, StrChunksExt}; +use core::spotify_id::{FileId, SpotifyId}; +use core::util::StrChunksExt; pub use protocol::metadata::AudioFile_Format as FileFormat; @@ -22,7 +23,8 @@ fn countrylist_contains(list: &str, country: &str) -> bool { } fn parse_restrictions<'s, I>(restrictions: I, country: &str, catalogue: &str) -> bool - where I: IntoIterator +where + I: IntoIterator, { let mut forbidden = "".to_string(); let mut has_forbidden = false; @@ -30,9 +32,9 @@ fn parse_restrictions<'s, I>(restrictions: I, country: &str, catalogue: &str) -> let mut allowed = "".to_string(); let mut has_allowed = false; - let rs = restrictions.into_iter().filter(|r| - r.get_catalogue_str().contains(&catalogue.to_owned()) - ); + let rs = restrictions + .into_iter() + .filter(|r| r.get_catalogue_str().contains(&catalogue.to_owned())); for r in rs { if r.has_countries_forbidden() { @@ -46,12 +48,12 @@ fn parse_restrictions<'s, I>(restrictions: I, country: &str, catalogue: &str) -> } } - (has_forbidden || has_allowed) && - (!has_forbidden || !countrylist_contains(forbidden.as_str(), country)) && - (!has_allowed || countrylist_contains(allowed.as_str(), country)) + (has_forbidden || has_allowed) + && (!has_forbidden || !countrylist_contains(forbidden.as_str(), country)) + && (!has_allowed || countrylist_contains(allowed.as_str(), country)) } -pub trait Metadata : Send + Sized + 'static { +pub trait Metadata: Send + Sized + 'static { type Message: protobuf::MessageStatic; fn base_url() -> &'static str; @@ -110,20 +112,20 @@ impl Metadata for Track { let country = session.country(); let artists = msg.get_artist() - .iter() - .filter(|artist| artist.has_gid()) - .map(|artist| SpotifyId::from_raw(artist.get_gid())) - .collect::>(); + .iter() + .filter(|artist| artist.has_gid()) + .map(|artist| SpotifyId::from_raw(artist.get_gid())) + .collect::>(); let files = msg.get_file() - .iter() - .filter(|file| file.has_file_id()) - .map(|file| { - let mut dst = [0u8; 20]; - dst.clone_from_slice(file.get_file_id()); - (file.get_format(), FileId(dst)) - }) - .collect(); + .iter() + .filter(|file| file.has_file_id()) + .map(|file| { + let mut dst = [0u8; 20]; + dst.clone_from_slice(file.get_file_id()); + (file.get_format(), FileId(dst)) + }) + .collect(); Track { id: SpotifyId::from_raw(msg.get_gid()), @@ -133,12 +135,10 @@ impl Metadata for Track { artists: artists, files: files, alternatives: msg.get_alternative() - .iter() - .map(|alt| SpotifyId::from_raw(alt.get_gid())) - .collect(), - available: parse_restrictions(msg.get_restriction(), - &country, - "premium"), + .iter() + .map(|alt| SpotifyId::from_raw(alt.get_gid())) + .collect(), + available: parse_restrictions(msg.get_restriction(), &country, "premium"), } } } @@ -152,28 +152,28 @@ impl Metadata for Album { fn parse(msg: &Self::Message, _: &Session) -> Self { let artists = msg.get_artist() - .iter() - .filter(|artist| artist.has_gid()) - .map(|artist| SpotifyId::from_raw(artist.get_gid())) - .collect::>(); + .iter() + .filter(|artist| artist.has_gid()) + .map(|artist| SpotifyId::from_raw(artist.get_gid())) + .collect::>(); let tracks = msg.get_disc() - .iter() - .flat_map(|disc| disc.get_track()) - .filter(|track| track.has_gid()) - .map(|track| SpotifyId::from_raw(track.get_gid())) - .collect::>(); + .iter() + .flat_map(|disc| disc.get_track()) + .filter(|track| track.has_gid()) + .map(|track| SpotifyId::from_raw(track.get_gid())) + .collect::>(); let covers = msg.get_cover_group() - .get_image() - .iter() - .filter(|image| image.has_file_id()) - .map(|image| { - let mut dst = [0u8; 20]; - dst.clone_from_slice(image.get_file_id()); - FileId(dst) - }) - .collect::>(); + .get_image() + .iter() + .filter(|image| image.has_file_id()) + .map(|image| { + let mut dst = [0u8; 20]; + dst.clone_from_slice(image.get_file_id()); + FileId(dst) + }) + .collect::>(); Album { id: SpotifyId::from_raw(msg.get_gid()), @@ -185,7 +185,6 @@ impl Metadata for Album { } } - impl Metadata for Artist { type Message = protocol::metadata::Artist; @@ -197,23 +196,22 @@ impl Metadata for Artist { let country = session.country(); let top_tracks: Vec = match msg.get_top_track() - .iter() - .find(|tt| !tt.has_country() || countrylist_contains(tt.get_country(), &country)) { - Some(tracks) => { - tracks.get_track() - .iter() - .filter(|track| track.has_gid()) - .map(|track| SpotifyId::from_raw(track.get_gid())) - .collect::>() - }, - None => Vec::new() - }; - + .iter() + .find(|tt| !tt.has_country() || countrylist_contains(tt.get_country(), &country)) + { + Some(tracks) => tracks + .get_track() + .iter() + .filter(|track| track.has_gid()) + .map(|track| SpotifyId::from_raw(track.get_gid())) + .collect::>(), + None => Vec::new(), + }; Artist { id: SpotifyId::from_raw(msg.get_gid()), name: msg.get_name().to_owned(), - top_tracks: top_tracks + top_tracks: top_tracks, } } } diff --git a/playback/src/player.rs b/playback/src/player.rs index 48f7f307..e5497365 100644 --- a/playback/src/player.rs +++ b/playback/src/player.rs @@ -11,7 +11,7 @@ use std::time::Duration; use config::{Bitrate, PlayerConfig}; use core::session::Session; -use core::util::SpotifyId; +use core::spotify_id::SpotifyId; use audio_backend::Sink; use audio::{AudioFile, AudioDecrypt}; From ea597361ff4617a1bb2b7390574b447ccbf26c7b Mon Sep 17 00:00:00 2001 From: awiouy Date: Tue, 13 Feb 2018 08:18:49 +0100 Subject: [PATCH 6/9] core API: component.new() --- core/src/component.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/component.rs b/core/src/component.rs index 29aef1bf..50ab7b37 100644 --- a/core/src/component.rs +++ b/core/src/component.rs @@ -4,7 +4,7 @@ macro_rules! component { pub struct $name(::std::sync::Arc<($crate::session::SessionWeak, ::std::sync::Mutex<$inner>)>); impl $name { #[allow(dead_code)] - pub fn new(session: $crate::session::SessionWeak) -> $name { + pub(crate) fn new(session: $crate::session::SessionWeak) -> $name { debug!(target:"librespot::component", "new {}", stringify!($name)); $name(::std::sync::Arc::new((session, ::std::sync::Mutex::new($inner { From 0ed4fb1c68e1d682039b9899d6a4bd1e824c69b4 Mon Sep 17 00:00:00 2001 From: awiouy Date: Tue, 13 Feb 2018 08:24:59 +0100 Subject: [PATCH 7/9] core API: MercuryManager.request() --- core/src/mercury/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/mercury/mod.rs b/core/src/mercury/mod.rs index 9a607061..e79c281f 100644 --- a/core/src/mercury/mod.rs +++ b/core/src/mercury/mod.rs @@ -51,7 +51,7 @@ impl MercuryManager { seq } - pub fn request(&self, req: MercuryRequest) -> MercuryFuture { + fn request(&self, req: MercuryRequest) -> MercuryFuture { let (tx, rx) = oneshot::channel(); let pending = MercuryPending { From edbe00c62b610d4b84c811a8efce105c3d01422e Mon Sep 17 00:00:00 2001 From: awiouy Date: Tue, 13 Feb 2018 08:33:50 +0100 Subject: [PATCH 8/9] core API: move StrChunks* to metadata --- core/src/util/mod.rs | 26 -------------------------- metadata/src/lib.rs | 27 ++++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/core/src/util/mod.rs b/core/src/util/mod.rs index 32b058ad..9c373eaa 100644 --- a/core/src/util/mod.rs +++ b/core/src/util/mod.rs @@ -29,32 +29,6 @@ pub fn powm(base: &BigUint, exp: &BigUint, modulus: &BigUint) -> BigUint { result } -pub struct StrChunks<'s>(&'s str, usize); - -pub trait StrChunksExt { - fn chunks(&self, size: usize) -> StrChunks; -} - -impl StrChunksExt for str { - fn chunks(&self, size: usize) -> StrChunks { - StrChunks(self, size) - } -} - -impl<'s> Iterator for StrChunks<'s> { - type Item = &'s str; - fn next(&mut self) -> Option<&'s str> { - let &mut StrChunks(data, size) = self; - if data.is_empty() { - None - } else { - let ret = Some(&data[..size]); - self.0 = &data[size..]; - ret - } - } -} - pub trait ReadSeek: ::std::io::Read + ::std::io::Seek {} impl ReadSeek for T {} diff --git a/metadata/src/lib.rs b/metadata/src/lib.rs index 664d9a22..0103a3b0 100644 --- a/metadata/src/lib.rs +++ b/metadata/src/lib.rs @@ -14,7 +14,6 @@ use linear_map::LinearMap; use core::mercury::MercuryError; use core::session::Session; use core::spotify_id::{FileId, SpotifyId}; -use core::util::StrChunksExt; pub use protocol::metadata::AudioFile_Format as FileFormat; @@ -215,3 +214,29 @@ impl Metadata for Artist { } } } + +struct StrChunks<'s>(&'s str, usize); + +trait StrChunksExt { + fn chunks(&self, size: usize) -> StrChunks; +} + +impl StrChunksExt for str { + fn chunks(&self, size: usize) -> StrChunks { + StrChunks(self, size) + } +} + +impl<'s> Iterator for StrChunks<'s> { + type Item = &'s str; + fn next(&mut self) -> Option<&'s str> { + let &mut StrChunks(data, size) = self; + if data.is_empty() { + None + } else { + let ret = Some(&data[..size]); + self.0 = &data[size..]; + ret + } + } +} From a427c8316b39b806ea70ee795265de48e98dac68 Mon Sep 17 00:00:00 2001 From: awiouy Date: Tue, 13 Feb 2018 08:34:52 +0100 Subject: [PATCH 9/9] metadata.rs is empty --- metadata/src/metadata.rs | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 metadata/src/metadata.rs diff --git a/metadata/src/metadata.rs b/metadata/src/metadata.rs deleted file mode 100644 index e69de29b..00000000