diff options
| author | acdenisSK <[email protected]> | 2017-07-27 06:42:48 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-07-27 07:30:23 +0200 |
| commit | 550030264952f0e0043b63f4582bb817ef8bbf37 (patch) | |
| tree | b921e2f78fd603a5ca671623083a32806fd16090 /src/voice/threading.rs | |
| parent | Use a consistent indentation style (diff) | |
| download | serenity-550030264952f0e0043b63f4582bb817ef8bbf37.tar.xz serenity-550030264952f0e0043b63f4582bb817ef8bbf37.zip | |
rustfmt
Diffstat (limited to 'src/voice/threading.rs')
| -rw-r--r-- | src/voice/threading.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/voice/threading.rs b/src/voice/threading.rs index fe0aebc..f272282 100644 --- a/src/voice/threading.rs +++ b/src/voice/threading.rs @@ -2,8 +2,8 @@ use std::sync::mpsc::{Receiver as MpscReceiver, TryRecvError}; use std::thread::Builder as ThreadBuilder; use super::connection::Connection; use super::Status; -use ::internal::Timer; -use ::model::GuildId; +use internal::Timer; +use model::GuildId; pub(crate) fn start(guild_id: GuildId, rx: MpscReceiver<Status>) { let name = format!("Serenity Voice (G{})", guild_id); @@ -25,9 +25,7 @@ fn runner(rx: &MpscReceiver<Status>) { match rx.try_recv() { Ok(Status::Connect(info)) => { connection = match Connection::new(info) { - Ok(connection) => { - Some(connection) - }, + Ok(connection) => Some(connection), Err(why) => { warn!("[Voice] Error connecting: {:?}", why); @@ -64,9 +62,7 @@ fn runner(rx: &MpscReceiver<Status>) { // another event. let error = match connection.as_mut() { Some(connection) => { - let cycle = connection.cycle(&mut sender, - &mut receiver, - &mut timer); + let cycle = connection.cycle(&mut sender, &mut receiver, &mut timer); match cycle { Ok(()) => false, |