Remove "extern crate"s from librespot-audio

This commit is contained in:
johannesd3 2021-02-10 23:13:32 +01:00 committed by Johannesd3
parent 746e6c863e
commit b83976a8ec
3 changed files with 6 additions and 21 deletions

View file

@ -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<Option<AudioPacket>, 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))),

View file

@ -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;

View file

@ -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;