aboutsummaryrefslogtreecommitdiff
path: root/src/voice/streamer.rs
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-07-27 08:10:41 +0200
committeracdenisSK <[email protected]>2017-07-27 08:10:41 +0200
commit70b5097aaac85f970c32ceb988dbb5f5d575ee0f (patch)
treed2f391d3b552cfae58b74748a2a2aa5ae80c7986 /src/voice/streamer.rs
parentrustfmt (diff)
downloadserenity-70b5097aaac85f970c32ceb988dbb5f5d575ee0f.tar.xz
serenity-70b5097aaac85f970c32ceb988dbb5f5d575ee0f.zip
Change the config a bit, and a few nitpicks
Diffstat (limited to 'src/voice/streamer.rs')
-rw-r--r--src/voice/streamer.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/voice/streamer.rs b/src/voice/streamer.rs
index c755da2..c8400f0 100644
--- a/src/voice/streamer.rs
+++ b/src/voice/streamer.rs
@@ -101,11 +101,9 @@ pub fn ytdl(uri: &str) -> Result<Box<AudioSource>> {
};
let uri = match obj.remove("url") {
- Some(v) => {
- match v {
- Value::String(uri) => uri,
- other => return Err(Error::Voice(VoiceError::YouTubeDLUrl(other))),
- }
+ Some(v) => match v {
+ Value::String(uri) => uri,
+ other => return Err(Error::Voice(VoiceError::YouTubeDLUrl(other))),
},
None => return Err(Error::Voice(VoiceError::YouTubeDLUrl(Value::Object(obj)))),
};