aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2018-06-17 15:53:09 -0700
committerZeyla Hellyer <[email protected]>2018-06-17 15:53:09 -0700
commit6ddfef8359a619be9a49be7b33b466724eed0ecb (patch)
tree5fb9c070b1650b95aa6b5713b3630fc253095275 /src
parentFix Args test (diff)
downloadserenity-6ddfef8359a619be9a49be7b33b466724eed0ecb.tar.xz
serenity-6ddfef8359a619be9a49be7b33b466724eed0ecb.zip
Remove extraneous spaces at the end of lines
Diffstat (limited to 'src')
-rw-r--r--src/cache/mod.rs4
-rw-r--r--src/client/bridge/gateway/mod.rs4
-rw-r--r--src/client/bridge/gateway/shard_queuer.rs4
-rw-r--r--src/client/error.rs2
-rw-r--r--src/client/event_handler.rs108
-rw-r--r--src/error.rs4
-rw-r--r--src/framework/mod.rs2
-rw-r--r--src/framework/standard/command.rs4
-rw-r--r--src/framework/standard/create_command.rs8
-rw-r--r--src/framework/standard/create_group.rs6
-rw-r--r--src/gateway/error.rs4
-rw-r--r--src/http/error.rs4
-rw-r--r--src/http/mod.rs12
-rw-r--r--src/http/ratelimiting.rs4
-rw-r--r--src/model/channel/channel_id.rs6
-rw-r--r--src/model/channel/reaction.rs6
-rw-r--r--src/model/error.rs4
-rw-r--r--src/model/guild/audit_log.rs2
-rw-r--r--src/model/guild/emoji.rs6
-rw-r--r--src/model/mod.rs4
-rw-r--r--src/model/webhook.rs4
-rw-r--r--src/utils/vec_map.rs4
-rw-r--r--src/voice/audio.rs2
-rw-r--r--src/voice/connection.rs20
-rw-r--r--src/voice/handler.rs4
-rw-r--r--src/voice/mod.rs14
-rw-r--r--src/voice/streamer.rs18
27 files changed, 132 insertions, 132 deletions
diff --git a/src/cache/mod.rs b/src/cache/mod.rs
index bbaf9b1..bee2b45 100644
--- a/src/cache/mod.rs
+++ b/src/cache/mod.rs
@@ -45,8 +45,8 @@
use model::prelude::*;
use parking_lot::RwLock;
use std::collections::{
- hash_map::Entry,
- HashMap,
+ hash_map::Entry,
+ HashMap,
HashSet
};
use std::{
diff --git a/src/client/bridge/gateway/mod.rs b/src/client/bridge/gateway/mod.rs
index 16f0f07..27b5c10 100644
--- a/src/client/bridge/gateway/mod.rs
+++ b/src/client/bridge/gateway/mod.rs
@@ -65,8 +65,8 @@ pub use self::shard_runner_message::ShardRunnerMessage;
use std::{
fmt::{
- Display,
- Formatter,
+ Display,
+ Formatter,
Result as FmtResult
},
sync::mpsc::Sender,
diff --git a/src/client/bridge/gateway/shard_queuer.rs b/src/client/bridge/gateway/shard_queuer.rs
index edcb6ab..07c6a2f 100644
--- a/src/client/bridge/gateway/shard_queuer.rs
+++ b/src/client/bridge/gateway/shard_queuer.rs
@@ -5,8 +5,8 @@ use std::{
collections::{HashMap, VecDeque},
sync::{
mpsc::{
- Receiver,
- RecvTimeoutError,
+ Receiver,
+ RecvTimeoutError,
Sender},
Arc
},
diff --git a/src/client/error.rs b/src/client/error.rs
index e1f9eb2..4858f29 100644
--- a/src/client/error.rs
+++ b/src/client/error.rs
@@ -2,7 +2,7 @@ use std::{
error::Error as StdError,
fmt::{
Display,
- Formatter,
+ Formatter,
Result as FmtResult
}
};
diff --git a/src/client/event_handler.rs b/src/client/event_handler.rs
index dba1024..32fdaa1 100644
--- a/src/client/event_handler.rs
+++ b/src/client/event_handler.rs
@@ -11,96 +11,96 @@ use ::client::bridge::gateway::event::*;
/// The core trait for handling events by serenity.
pub trait EventHandler {
/// Dispatched when the cache gets full.
- ///
+ ///
/// Provides the cached guilds' ids.
#[cfg(feature = "cache")]
fn cached(&self, _ctx: Context, _guilds: Vec<GuildId>) {}
/// Dispatched when a channel is created.
- ///
+ ///
/// Provides said channel's data.
fn channel_create(&self, _ctx: Context, _channel: Arc<RwLock<GuildChannel>>) {}
/// Dispatched when a category is created.
- ///
+ ///
/// Provides said category's data.
fn category_create(&self, _ctx: Context, _category: Arc<RwLock<ChannelCategory>>) {}
/// Dispatched when a category is deleted.
- ///
+ ///
/// Provides said category's data.
fn category_delete(&self, _ctx: Context, _category: Arc<RwLock<ChannelCategory>>) {}
/// Dispatched when a private channel is created.
- ///
+ ///
/// Provides said channel's data.
fn private_channel_create(&self, _ctx: Context, _channel: Arc<RwLock<PrivateChannel>>) {}
/// Dispatched when a channel is deleted.
- ///
+ ///
/// Provides said channel's data.
fn channel_delete(&self, _ctx: Context, _channel: Arc<RwLock<GuildChannel>>) {}
/// Dispatched when a pin is added, deleted.
- ///
+ ///
/// Provides said pin's data.
fn channel_pins_update(&self, _ctx: Context, _pin: ChannelPinsUpdateEvent) {}
/// Dispatched when a user is added to a `Group`.
- ///
+ ///
/// Provides the group's id and the user's data.
fn channel_recipient_addition(&self, _ctx: Context, _group_id: ChannelId, _user: User) {}
/// Dispatched when a user is removed to a `Group`.
- ///
+ ///
/// Provides the group's id and the user's data.
fn channel_recipient_removal(&self, _ctx: Context, _group_id: ChannelId, _user: User) {}
/// Dispatched when a channel is updated.
- ///
+ ///
/// Provides the old channel data, and the new data.
#[cfg(feature = "cache")]
fn channel_update(&self, _ctx: Context, _old: Option<Channel>, _new: Channel) {}
/// Dispatched when a channel is updated.
- ///
+ ///
/// Provides the new data.
#[cfg(not(feature = "cache"))]
fn channel_update(&self, _ctx: Context, _new_data: Channel) {}
/// Dispatched when a user is banned from a guild.
- ///
+ ///
/// Provides the guild's id and the banned user's data.
fn guild_ban_addition(&self, _ctx: Context, _guild_id: GuildId, _banned_user: User) {}
/// Dispatched when a user's ban is lifted from a guild.
- ///
+ ///
/// Provides the guild's id and the lifted user's data.
fn guild_ban_removal(&self, _ctx: Context, _guild_id: GuildId, _unbanned_user: User) {}
- /// Dispatched when a guild is created;
+ /// Dispatched when a guild is created;
/// or an existing guild's data is sent to us.
- ///
+ ///
/// Provides the guild's data and whether the guild is new.
#[cfg(feature = "cache")]
fn guild_create(&self, _ctx: Context, _guild: Guild, _is_new: bool) {}
- /// Dispatched when a guild is created;
+ /// Dispatched when a guild is created;
/// or an existing guild's data is sent to us.
- ///
+ ///
/// Provides the guild's data.
#[cfg(not(feature = "cache"))]
fn guild_create(&self, _ctx: Context, _guild: Guild) {}
/// Dispatched when a guild is deleted.
- ///
+ ///
/// Provides the partial data of the guild sent by discord,
/// and the full data from the cache, if available.
#[cfg(feature = "cache")]
fn guild_delete(&self, _ctx: Context, _incomplete: PartialGuild, _full: Option<Arc<RwLock<Guild>>>) {}
/// Dispatched when a guild is deleted.
- ///
+ ///
/// Provides the partial data of the guild sent by discord.
#[cfg(not(feature = "cache"))]
fn guild_delete(&self, _ctx: Context, _incomplete: PartialGuild) {}
@@ -108,139 +108,139 @@ pub trait EventHandler {
/* the emojis were updated. */
/// Dispatched when the emojis are updated.
- ///
+ ///
/// Provides the guild's id and the new state of the emojis in the guild.
fn guild_emojis_update(&self, _ctx: Context, _guild_id: GuildId, _current_state: HashMap<EmojiId, Emoji>) {}
/// Dispatched when a guild's integration is added, updated or removed.
- ///
+ ///
/// Provides the guild's id.
fn guild_integrations_update(&self, _ctx: Context, _guild_id: GuildId) {}
/// Dispatched when a user joins a guild.
- ///
+ ///
/// Provides the guild's id and the user's member data.
fn guild_member_addition(&self, _ctx: Context, _guild_id: GuildId, _new_member: Member) {}
/// Dispatched when a user is removed (kicked).
- ///
+ ///
/// Provides the guild's id, the user's data, and the user's member data if available.
#[cfg(feature = "cache")]
fn guild_member_removal(&self, _ctx: Context, _guild: GuildId, _user: User, _member_data_if_available: Option<Member>) {}
/// Dispatched when a user is removed (kicked).
- ///
+ ///
/// Provides the guild's id, the user's data.
#[cfg(not(feature = "cache"))]
fn guild_member_removal(&self, _ctx: Context, _guild_id: GuildId, _kicked: User) {}
/// Dispatched when a member is updated (e.g their nickname is updated)
- ///
+ ///
/// Provides the member's old data (if available) and the new data.
#[cfg(feature = "cache")]
fn guild_member_update(&self, _ctx: Context, _old_if_available: Option<Member>, _new: Member) {}
/// Dispatched when a member is updated (e.g their nickname is updated)
- ///
+ ///
/// Provides the new data.
#[cfg(not(feature = "cache"))]
fn guild_member_update(&self, _ctx: Context, _new: GuildMemberUpdateEvent) {}
/// Dispatched when the data for offline members was requested.
- ///
- /// Provides the guild's id and the data.
+ ///
+ /// Provides the guild's id and the data.
fn guild_members_chunk(&self, _ctx: Context, _guild_id: GuildId, _offline_members: HashMap<UserId, Member>) {}
/// Dispatched when a role is created.
- ///
+ ///
/// Provides the guild's id and the new role's data.
fn guild_role_create(&self, _ctx: Context, _guild_id: GuildId, _new: Role) {}
/// Dispatched when a role is deleted.
- ///
+ ///
/// Provides the guild's id, the role's id and its data if available.
#[cfg(feature = "cache")]
fn guild_role_delete(&self, _ctx: Context, _guild_id: GuildId, _removed_role_id: RoleId, _removed_role_data_if_available: Option<Role>) {}
/// Dispatched when a role is deleted.
- ///
+ ///
/// Provides the guild's id, the role's id.
#[cfg(not(feature = "cache"))]
fn guild_role_delete(&self, _ctx: Context, _guild_id: GuildId, _removed_role_id: RoleId) {}
/// Dispatched when a role is updated.
- ///
+ ///
/// Provides the guild's id, the role's old (if available) and new data.
#[cfg(feature = "cache")]
fn guild_role_update(&self, _ctx: Context, _guild_id: GuildId, _old_data_if_available: Option<Role>, _new: Role) {}
/// Dispatched when a role is updated.
- ///
+ ///
/// Provides the guild's id and the role's new data.
#[cfg(not(feature = "cache"))]
fn guild_role_update(&self, _ctx: Context, _guild_id: GuildId, _new_data: Role) {}
/// Dispatched when a guild became unavailable.
- ///
- /// Provides the guild's id.
+ ///
+ /// Provides the guild's id.
fn guild_unavailable(&self, _ctx: Context, _guild_id: GuildId) {}
/// Dispatched when the guild is updated.
- ///
+ ///
/// Provides the guild's old full data (if available) and the new, albeit partial data.
#[cfg(feature = "cache")]
fn guild_update(&self, _ctx: Context, _old_data_if_available: Option<Arc<RwLock<Guild>>>, _new_but_incomplete: PartialGuild) {}
/// Dispatched when the guild is updated.
- ///
+ ///
/// Provides the guild's new, albeit partial data.
#[cfg(not(feature = "cache"))]
fn guild_update(&self, _ctx: Context, _new_but_incomplete_data: PartialGuild) {}
/// Dispatched when a message is created.
- ///
+ ///
/// Provides the message's data.
fn message(&self, _ctx: Context, _new_message: Message) {}
/// Dispatched when a message is deleted.
- ///
+ ///
/// Provides the channel's id and the message's id.
fn message_delete(&self, _ctx: Context, _channel_id: ChannelId, _deleted_message_id: MessageId) {}
/// Dispatched when multiple messages were deleted at once.
- ///
+ ///
/// Provides the channel's id and the deleted messages' ids.
fn message_delete_bulk(&self, _ctx: Context, _channel_id: ChannelId, _multiple_deleted_messages_ids: Vec<MessageId>) {}
/// Dispatched when a new reaction is attached to a message.
- ///
+ ///
/// Provides the reaction's data.
fn reaction_add(&self, _ctx: Context, _add_reaction: Reaction) {}
/// Dispatched when a reaction is dettached from a message.
- ///
+ ///
/// Provides the reaction's data.
fn reaction_remove(&self, _ctx: Context, _removed_reaction: Reaction) {}
/// Dispatched when all reactions of a message are dettached from a message.
- ///
+ ///
/// Provides the channel's id and the message's id.
fn reaction_remove_all(&self, _ctx: Context, _channel_id: ChannelId, _removed_from_message_id: MessageId) {}
/// Dispatched when a message is updated.
- ///
+ ///
/// Provides the new data of the message.
fn message_update(&self, _ctx: Context, _new_data: MessageUpdateEvent) {}
fn presence_replace(&self, _ctx: Context, _: Vec<Presence>) {}
/// Dispatched when a user's presence is updated (e.g off -> on).
- ///
+ ///
/// Provides the presence's new data.
fn presence_update(&self, _ctx: Context, _new_data: PresenceUpdateEvent) {}
/// Dispatched upon startup.
- ///
+ ///
/// Provides data about the bot and the guilds it's in.
fn ready(&self, _ctx: Context, _data_about_bot: Ready) {}
@@ -248,7 +248,7 @@ pub trait EventHandler {
fn resume(&self, _ctx: Context, _: ResumedEvent) {}
/// Dispatched when a shard's connection stage is updated
- ///
+ ///
/// Provides the context of the shard and the event information about the update.
fn shard_stage_update(&self, _ctx: Context, _: ShardStageUpdateEvent) {}
@@ -256,35 +256,35 @@ pub trait EventHandler {
fn typing_start(&self, _ctx: Context, _: TypingStartEvent) {}
/// Dispatched when an unknown event was sent from discord.
- ///
+ ///
/// Provides the event's name and its unparsed data.
fn unknown(&self, _ctx: Context, _name: String, _raw: Value) {}
/// Dispatched when the bot's data is updated.
- ///
+ ///
/// Provides the old and new data.
#[cfg(feature = "cache")]
fn user_update(&self, _ctx: Context, _old_data: CurrentUser, _new: CurrentUser) {}
/// Dispatched when the bot's data is updated.
- ///
+ ///
/// Provides the new data.
#[cfg(not(feature = "cache"))]
fn user_update(&self, _ctx: Context, _new_data: CurrentUser) {}
/// Dispatched when a guild's voice server was updated (or changed to another one).
- ///
+ ///
/// Provides the voice server's data.
fn voice_server_update(&self, _ctx: Context, _: VoiceServerUpdateEvent) {}
/// Dispatched when a user joins, leaves or moves a voice channel.
- ///
- /// Provides the guild's id (if available) and
+ ///
+ /// Provides the guild's id (if available) and
/// the new state of the guild's voice channels.
fn voice_state_update(&self, _ctx: Context, _: Option<GuildId>, _: VoiceState) {}
/// Dispatched when a guild's webhook is updated.
- ///
+ ///
/// Provides the guild's id and the channel's id the webhook belongs in.
fn webhook_update(&self, _ctx: Context, _guild_id: GuildId, _belongs_to_channel_id: ChannelId) {}
}
diff --git a/src/error.rs b/src/error.rs
index fc0ab2c..29fd40c 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -4,8 +4,8 @@ use serde_json::Error as JsonError;
use std::{
error::Error as StdError,
fmt::{
- self,
- Display,
+ self,
+ Display,
Error as FormatError
},
io::Error as IoError,
diff --git a/src/framework/mod.rs b/src/framework/mod.rs
index 359882c..ad80e58 100644
--- a/src/framework/mod.rs
+++ b/src/framework/mod.rs
@@ -42,7 +42,7 @@
//! .configure(|c| c.prefix("~"))
//! .on("about", |_, msg, _| {
//! msg.channel_id.say("A simple test bot")?;
-//!
+//!
//! // The `command!` macro implicitly puts an `Ok(())` at the end of each command definiton;
//! // signifying successful execution.
//! //
diff --git a/src/framework/standard/command.rs b/src/framework/standard/command.rs
index d8fc81e..c9dad59 100644
--- a/src/framework/standard/command.rs
+++ b/src/framework/standard/command.rs
@@ -20,8 +20,8 @@ type CheckFunction = Fn(&mut Context, &Message, &mut Args, &CommandOptions) -> b
pub struct Check(pub(crate) Box<CheckFunction>);
impl Check {
- pub(crate) fn new<F: Send + Sync + 'static>(f: F) -> Self
- where F: Fn(&mut Context, &Message, &mut Args, &CommandOptions) -> bool
+ pub(crate) fn new<F: Send + Sync + 'static>(f: F) -> Self
+ where F: Fn(&mut Context, &Message, &mut Args, &CommandOptions) -> bool
{
Check(Box::new(f))
}
diff --git a/src/framework/standard/create_command.rs b/src/framework/standard/create_command.rs
index cba89c5..9c5e81c 100644
--- a/src/framework/standard/create_command.rs
+++ b/src/framework/standard/create_command.rs
@@ -1,8 +1,8 @@
pub use super::{
- Args,
- Command,
- CommandGroup,
- CommandOptions,
+ Args,
+ Command,
+ CommandGroup,
+ CommandOptions,
CommandError,
Check,
};
diff --git a/src/framework/standard/create_group.rs b/src/framework/standard/create_group.rs
index e31e4eb..18f6402 100644
--- a/src/framework/standard/create_group.rs
+++ b/src/framework/standard/create_group.rs
@@ -1,7 +1,7 @@
pub use super::command::{
- Command,
- CommandGroup,
- CommandOptions,
+ Command,
+ CommandGroup,
+ CommandOptions,
Error as CommandError
};
pub(crate) use super::command::CommandOrAlias;
diff --git a/src/gateway/error.rs b/src/gateway/error.rs
index 4a6d1b6..49cf10c 100644
--- a/src/gateway/error.rs
+++ b/src/gateway/error.rs
@@ -1,8 +1,8 @@
use std::{
error::Error as StdError,
fmt::{
- Display,
- Formatter,
+ Display,
+ Formatter,
Result as FmtResult
}
};
diff --git a/src/http/error.rs b/src/http/error.rs
index 2a5adeb..b433cb5 100644
--- a/src/http/error.rs
+++ b/src/http/error.rs
@@ -2,8 +2,8 @@ use hyper::client::Response;
use std::{
error::Error as StdError,
fmt::{
- Display,
- Formatter,
+ Display,
+ Formatter,
Result as FmtResult
}
};
diff --git a/src/http/mod.rs b/src/http/mod.rs
index a80f53a..6eab4c0 100644
--- a/src/http/mod.rs
+++ b/src/http/mod.rs
@@ -33,18 +33,18 @@ pub use hyper::status::{StatusClass, StatusCode};
use constants;
use hyper::{
client::{
- Client as HyperClient,
- Request,
- RequestBuilder,
+ Client as HyperClient,
+ Request,
+ RequestBuilder,
Response as HyperResponse
},
header::ContentType,
method::Method,
mime::{Mime, SubLevel, TopLevel},
net::HttpsConnector,
- header,
- Error as HyperError,
- Result as HyperResult,
+ header,
+ Error as HyperError,
+ Result as HyperResult,
Url
};
use hyper_native_tls::NativeTlsClient;
diff --git a/src/http/ratelimiting.rs b/src/http/ratelimiting.rs
index ad1ea8f..e9008b4 100644
--- a/src/http/ratelimiting.rs
+++ b/src/http/ratelimiting.rs
@@ -50,8 +50,8 @@ use std::{
collections::HashMap,
sync::Arc,
time::Duration,
- str,
- thread,
+ str,
+ thread,
i64
};
use super::{HttpError, LightMethod};
diff --git a/src/model/channel/channel_id.rs b/src/model/channel/channel_id.rs
index 78bfbd7..f939be8 100644
--- a/src/model/channel/channel_id.rs
+++ b/src/model/channel/channel_id.rs
@@ -7,9 +7,9 @@ use std::borrow::Cow;
use std::fmt::Write as FmtWrite;
#[cfg(feature = "model")]
use builder::{
- CreateMessage,
- EditChannel,
- EditMessage,
+ CreateMessage,
+ EditChannel,
+ EditMessage,
GetMessages
};
#[cfg(all(feature = "cache", feature = "model"))]
diff --git a/src/model/channel/reaction.rs b/src/model/channel/reaction.rs
index fcffa20..88f687f 100644
--- a/src/model/channel/reaction.rs
+++ b/src/model/channel/reaction.rs
@@ -4,9 +4,9 @@ use serde::ser::{SerializeMap, Serialize, Serializer};
use std::{
error::Error as StdError,
fmt::{
- Display,
- Formatter,
- Result as FmtResult,
+ Display,
+ Formatter,
+ Result as FmtResult,
Write as FmtWrite
},
str::FromStr
diff --git a/src/model/error.rs b/src/model/error.rs
index c0cd609..09aaded 100644
--- a/src/model/error.rs
+++ b/src/model/error.rs
@@ -3,8 +3,8 @@
use std::{
error::Error as StdError,
fmt::{
- Display,
- Formatter,
+ Display,
+ Formatter,
Result as FmtResult
}
};
diff --git a/src/model/guild/audit_log.rs b/src/model/guild/audit_log.rs
index a9ca429..1c24d98 100644
--- a/src/model/guild/audit_log.rs
+++ b/src/model/guild/audit_log.rs
@@ -324,7 +324,7 @@ mod option_u64_handler {
pub fn serialize<S: Serializer>(num: &Option<u64>, s: S) -> StdResult<S::Ok, S::Error> {
use serde::Serialize;
-
+
Option::serialize(num, s)
}
}
diff --git a/src/model/guild/emoji.rs b/src/model/guild/emoji.rs
index 2118c44..e787e46 100644
--- a/src/model/guild/emoji.rs
+++ b/src/model/guild/emoji.rs
@@ -1,7 +1,7 @@
use std::fmt::{
- Display,
- Formatter,
- Result as FmtResult,
+ Display,
+ Formatter,
+ Result as FmtResult,
Write as FmtWrite
};
use super::super::id::{EmojiId, RoleId};
diff --git a/src/model/mod.rs b/src/model/mod.rs
index 4416d2d..8afa79c 100644
--- a/src/model/mod.rs
+++ b/src/model/mod.rs
@@ -47,8 +47,8 @@ use serde::de::Visitor;
use std::{
collections::HashMap,
fmt::{
- Display,
- Formatter,
+ Display,
+ Formatter,
Result as FmtResult
},
sync::Arc,
diff --git a/src/model/webhook.rs b/src/model/webhook.rs
index ab07b43..65dae34 100644
--- a/src/model/webhook.rs
+++ b/src/model/webhook.rs
@@ -2,8 +2,8 @@
use super::{
id::{
- ChannelId,
- GuildId,
+ ChannelId,
+ GuildId,
WebhookId
},
user::User
diff --git a/src/utils/vec_map.rs b/src/utils/vec_map.rs
index 70e65f5..d02d659 100644
--- a/src/utils/vec_map.rs
+++ b/src/utils/vec_map.rs
@@ -2,7 +2,7 @@
// shamelessly copied from https://github.com/hyperium/hyper/blob/master/src/header/internals/vec_map.rs
/// Like `HashMap` but solely uses a vector instead.
-///
+///
/// note: This is for internal use.
#[derive(Clone, Debug, Default)]
pub struct VecMap<K, V>(Vec<(K, V)>);
@@ -117,4 +117,4 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> {
pub fn into_mut(self) -> &'a mut V {
&mut self.vec[self.pos].1
}
-} \ No newline at end of file
+}
diff --git a/src/voice/audio.rs b/src/voice/audio.rs
index b541f49..2e15590 100644
--- a/src/voice/audio.rs
+++ b/src/voice/audio.rs
@@ -46,7 +46,7 @@ pub enum AudioType {
///
/// # Example
///
-/// ```rust,ignore
+/// ```rust,ignore
/// use serenity::voice::{Handler, LockedAudio, ffmpeg};
///
/// let handler: Handler = /* ... */;
diff --git a/src/voice/connection.rs b/src/voice/connection.rs
index 8e94486..54d9116 100644
--- a/src/voice/connection.rs
+++ b/src/voice/connection.rs
@@ -1,8 +1,8 @@
use byteorder::{
- BigEndian,
- ByteOrder,
- LittleEndian,
- ReadBytesExt,
+ BigEndian,
+ ByteOrder,
+ LittleEndian,
+ ReadBytesExt,
WriteBytesExt
};
use constants::VOICE_GATEWAY_VERSION;
@@ -32,15 +32,15 @@ use std::{
net::{SocketAddr, ToSocketAddrs, UdpSocket},
sync::{
mpsc::{
- self,
- Receiver as MpscReceiver,
+ self,
+ Receiver as MpscReceiver,
Sender as MpscSender
},
Arc,
},
thread::{
- self,
- Builder as ThreadBuilder,
+ self,
+ Builder as ThreadBuilder,
JoinHandle
},
time::Duration
@@ -53,8 +53,8 @@ use websocket::{
sync::{
client::ClientBuilder,
stream::{
- AsTcpStream,
- TcpStream,
+ AsTcpStream,
+ TcpStream,
TlsStream
},
},
diff --git a/src/voice/handler.rs b/src/voice/handler.rs
index 070b0c1..d42b8b8 100644
--- a/src/voice/handler.rs
+++ b/src/voice/handler.rs
@@ -2,8 +2,8 @@ use constants::VoiceOpCode;
use gateway::InterMessage;
use model::{
id::{
- ChannelId,
- GuildId,
+ ChannelId,
+ GuildId,
UserId
},
voice::VoiceState
diff --git a/src/voice/mod.rs b/src/voice/mod.rs
index 283ab36..51fb0e2 100644
--- a/src/voice/mod.rs
+++ b/src/voice/mod.rs
@@ -13,10 +13,10 @@ mod threading;
pub use self::{
audio::{
- Audio,
- AudioReceiver,
- AudioSource,
- AudioType,
+ Audio,
+ AudioReceiver,
+ AudioSource,
+ AudioType,
LockedAudio
},
dca::DcaMetadata,
@@ -24,9 +24,9 @@ pub use self::{
handler::Handler,
manager::Manager,
streamer::{
- dca,
- ffmpeg,
- opus,
+ dca,
+ ffmpeg,
+ opus,
pcm,
ytdl
}
diff --git a/src/voice/streamer.rs b/src/voice/streamer.rs
index faf467c..bf77b1d 100644
--- a/src/voice/streamer.rs
+++ b/src/voice/streamer.rs
@@ -5,23 +5,23 @@ use std::{
ffi::OsStr,
fs::File,
io::{
- BufReader,
- ErrorKind as IoErrorKind,
- Read,
+ BufReader,
+ ErrorKind as IoErrorKind,
+ Read,
Result as IoResult
},
process::{
- Child,
- Command,
+ Child,
+ Command,
Stdio
},
result::Result as StdResult
};
use super::{
- AudioSource,
- AudioType,
- DcaError,
- DcaMetadata,
+ AudioSource,
+ AudioType,
+ DcaError,
+ DcaMetadata,
VoiceError
};