diff options
| author | Nathan Perry <avaglir@gmail.com> | 2019-02-15 23:02:26 -0500 |
|---|---|---|
| committer | Nathan Perry <avaglir@gmail.com> | 2019-02-15 23:02:26 -0500 |
| commit | 978945e16046fb28b2351ee637fd267c38df93ac (patch) | |
| tree | 063b3d866c759efcc5decc6581fc1905eba0c35b | |
| parent | 61042c26faee164b51dda27561c9b67b34af8d9a (diff) | |
clean up imports
| -rw-r--r-- | src/commands/playback/types.rs | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/src/commands/playback/types.rs b/src/commands/playback/types.rs index 380ee9d..e4bbd26 100644 --- a/src/commands/playback/types.rs +++ b/src/commands/playback/types.rs @@ -3,6 +3,15 @@ use std::{ sync::{Arc, RwLock}, thread, time::Duration, + io::{ + Read, + Result as IoResult, + }, + process::{ + Command, + Stdio, + Child, + } }; use chrono::Duration as CDuration; @@ -11,9 +20,14 @@ use serenity::{ client::bridge::voice::ClientVoiceManager, model::id::ChannelId, prelude::*, - voice::{LockedAudio}, + voice::{ + LockedAudio, + AudioSource, + pcm, + }, }; use typemap::Key; +use serde_json::Value; use crate::{ commands::{ @@ -22,6 +36,7 @@ use crate::{ }, must_env_lookup, TARGET_GUILD_ID, + Result, }; pub struct VoiceManager; @@ -164,28 +179,7 @@ impl PlayQueue { } } -use std::{ - io::{ - Read, - Result as IoResult, - BufReader, - }, - process::{ - Command, - Stdio, - Child, - } -}; - -use serenity::{ - voice::{ - AudioSource, - pcm, - } -}; -use serde_json::Value; -use crate::Result; - +// Copied from serenity struct ChildContainer(Child); impl Read for ChildContainer { @@ -202,8 +196,6 @@ impl Drop for ChildContainer { } } - -// Copied from serenity pub fn ytdl(uri: &str, start: Option<CDuration>, end: Option<CDuration>) -> Result<Box<AudioSource>> { let args = [ "-f", |
