aboutsummaryrefslogtreecommitdiff
path: root/src/voice/handler.rs
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-07-27 06:42:48 +0200
committeracdenisSK <[email protected]>2017-07-27 07:30:23 +0200
commit550030264952f0e0043b63f4582bb817ef8bbf37 (patch)
treeb921e2f78fd603a5ca671623083a32806fd16090 /src/voice/handler.rs
parentUse a consistent indentation style (diff)
downloadserenity-550030264952f0e0043b63f4582bb817ef8bbf37.tar.xz
serenity-550030264952f0e0043b63f4582bb817ef8bbf37.zip
rustfmt
Diffstat (limited to 'src/voice/handler.rs')
-rw-r--r--src/voice/handler.rs24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/voice/handler.rs b/src/voice/handler.rs
index fb157e6..fb1bf28 100644
--- a/src/voice/handler.rs
+++ b/src/voice/handler.rs
@@ -3,8 +3,8 @@ use std::sync::mpsc::{self, Sender as MpscSender};
use super::{AudioReceiver, AudioSource};
use super::connection_info::ConnectionInfo;
use super::Status as VoiceStatus;
-use ::constants::VoiceOpCode;
-use ::model::{ChannelId, GuildId, UserId, VoiceState};
+use constants::VoiceOpCode;
+use model::{ChannelId, GuildId, UserId, VoiceState};
use super::threading;
/// The handler is responsible for "handling" a single voice connection, acting
@@ -153,12 +153,12 @@ impl Handler {
// Safe as all of these being present was already checked.
self.send(VoiceStatus::Connect(ConnectionInfo {
- endpoint: endpoint,
- guild_id: guild_id,
- session_id: session_id,
- token: token,
- user_id: user_id,
- }));
+ endpoint: endpoint,
+ guild_id: guild_id,
+ session_id: session_id,
+ token: token,
+ user_id: user_id,
+ }));
true
}
@@ -256,9 +256,7 @@ impl Handler {
}
/// Stops playing audio from a source, if one is set.
- pub fn stop(&mut self) {
- self.send(VoiceStatus::SetSender(None))
- }
+ pub fn stop(&mut self) { self.send(VoiceStatus::SetSender(None)) }
/// Switches the current connected voice channel to the given `channel_id`.
///
@@ -418,7 +416,5 @@ impl Handler {
impl Drop for Handler {
/// Leaves the current connected voice channel, if connected to one, and
/// forgets all configurations relevant to this Handler.
- fn drop(&mut self) {
- self.leave();
- }
+ fn drop(&mut self) { self.leave(); }
}