diff --git a/audio/src/lewton_decoder.rs b/audio/src/lewton_decoder.rs index 1addaa01..086ea57e 100644 --- a/audio/src/lewton_decoder.rs +++ b/audio/src/lewton_decoder.rs @@ -1,6 +1,4 @@ -extern crate lewton; - -use self::lewton::inside_ogg::OggStreamReader; +use lewton::inside_ogg::OggStreamReader; use super::{AudioDecoder, AudioError, AudioPacket}; use std::error; @@ -32,10 +30,10 @@ where } fn next_packet(&mut self) -> Result, AudioError> { - use self::lewton::audio::AudioReadError::AudioIsHeader; - use self::lewton::OggReadError::NoCapturePatternFound; - use self::lewton::VorbisError::BadAudio; - use self::lewton::VorbisError::OggError; + use lewton::audio::AudioReadError::AudioIsHeader; + use lewton::OggReadError::NoCapturePatternFound; + use lewton::VorbisError::BadAudio; + use lewton::VorbisError::OggError; loop { match self.0.read_dec_packet_itl() { Ok(Some(packet)) => return Ok(Some(AudioPacket::Samples(packet))), diff --git a/audio/src/lib.rs b/audio/src/lib.rs index 8b3a8dfa..9bb6f8e4 100644 --- a/audio/src/lib.rs +++ b/audio/src/lib.rs @@ -5,17 +5,6 @@ extern crate log; #[macro_use] extern crate pin_project_lite; -extern crate aes_ctr; -extern crate bit_set; -extern crate byteorder; -extern crate bytes; -extern crate futures; -extern crate num_bigint; -extern crate num_traits; -extern crate tempfile; - -extern crate librespot_core; - mod decrypt; mod fetch; diff --git a/audio/src/libvorbis_decoder.rs b/audio/src/libvorbis_decoder.rs index 8aced556..eeef8ab9 100644 --- a/audio/src/libvorbis_decoder.rs +++ b/audio/src/libvorbis_decoder.rs @@ -1,7 +1,5 @@ #[cfg(feature = "with-tremor")] -extern crate librespot_tremor as vorbis; -#[cfg(not(feature = "with-tremor"))] -extern crate vorbis; +use librespot_tremor as vorbis; use super::{AudioDecoder, AudioError, AudioPacket}; use std::error;