浏览代码

Import librespot_protocol as protocol.

Paul Lietar 9 年之前
父节点
当前提交
93640465dc
共有 5 个文件被更改,包括 8 次插入8 次删除
  1. 2 2
      src/authentication.rs
  2. 1 1
      src/lib.rs
  3. 1 1
      src/mercury.rs
  4. 2 2
      src/metadata.rs
  5. 2 2
      src/spirc.rs

+ 2 - 2
src/authentication.rs

@@ -14,8 +14,8 @@ use rustc_serialize::base64::FromBase64;
 
 use connection::{PlainConnection, CipherConnection};
 use diffie_hellman::DHLocalKeys;
-use librespot_protocol as protocol;
-use librespot_protocol::authentication::AuthenticationType;
+use protocol;
+use protocol::authentication::AuthenticationType;
 use session::Session;
 use util;
 

+ 1 - 1
src/lib.rs

@@ -26,7 +26,7 @@ extern crate vorbis;
 #[cfg(feature = "dns-sd")]
 extern crate dns_sd;
 
-extern crate librespot_protocol;
+extern crate librespot_protocol as protocol;
 
 #[macro_use]pub mod util;
 mod audio_decrypt;

+ 1 - 1
src/mercury.rs

@@ -6,7 +6,7 @@ use std::io::{Cursor, Read, Write};
 use std::mem::replace;
 use std::sync::mpsc;
 
-use librespot_protocol as protocol;
+use protocol;
 use session::Session;
 use connection::PacketHandler;
 

+ 2 - 2
src/metadata.rs

@@ -1,12 +1,12 @@
 use eventual::{Async, Future};
 use protobuf;
 
-use librespot_protocol as protocol;
+use protocol;
 use mercury::{MercuryRequest, MercuryMethod};
 use util::{SpotifyId, FileId, StrChunksExt};
 use session::Session;
 
-pub use librespot_protocol::metadata::AudioFile_Format as FileFormat;
+pub use protocol::metadata::AudioFile_Format as FileFormat;
 
 fn countrylist_contains(list: &str, country: &str) -> bool {
     list.chunks(2).any(|cc| cc == country)

+ 2 - 2
src/spirc.rs

@@ -10,8 +10,8 @@ use player::{Player, PlayerState};
 
 use std::sync::{Mutex, Arc};
 
-use librespot_protocol as protocol;
-pub use librespot_protocol::spirc::PlayStatus;
+use protocol;
+pub use protocol::spirc::PlayStatus;
 
 pub struct SpircManager(Arc<Mutex<SpircInternal>>);