aboutsummaryrefslogtreecommitdiff
path: root/src/gateway/shard.rs
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2018-03-29 12:10:43 +0200
committeracdenisSK <[email protected]>2018-03-29 12:11:23 +0200
commit4c05e828d5191975ef1a5e1ac581b646a69d2c25 (patch)
treefb583f88a1e5d192651b399aca1839f3f58e661e /src/gateway/shard.rs
parentAdd a connection timeout (diff)
downloadserenity-4c05e828d5191975ef1a5e1ac581b646a69d2c25.tar.xz
serenity-4c05e828d5191975ef1a5e1ac581b646a69d2c25.zip
Refactor imports/exports to use nested groups and better formatting
Diffstat (limited to 'src/gateway/shard.rs')
-rw-r--r--src/gateway/shard.rs26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/gateway/shard.rs b/src/gateway/shard.rs
index aee2bd0..88f8743 100644
--- a/src/gateway/shard.rs
+++ b/src/gateway/shard.rs
@@ -1,12 +1,16 @@
use constants::{self, close_codes};
use internal::prelude::*;
-use model::event::{Event, GatewayEvent};
-use model::gateway::Game;
-use model::id::GuildId;
-use model::user::OnlineStatus;
+use model::{
+ event::{Event, GatewayEvent},
+ gateway::Game,
+ id::GuildId,
+ user::OnlineStatus
+};
use parking_lot::Mutex;
-use std::sync::Arc;
-use std::time::{Duration as StdDuration, Instant};
+use std::{
+ sync::Arc,
+ time::{Duration as StdDuration, Instant}
+};
use super::{
ConnectionStage,
CurrentPresence,
@@ -16,10 +20,12 @@ use super::{
WsClient,
WebSocketGatewayClientExt,
};
-use websocket::client::Url;
-use websocket::stream::sync::AsTcpStream;
-use websocket::sync::client::ClientBuilder;
-use websocket::WebSocketError;
+use websocket::{
+ client::Url,
+ stream::sync::AsTcpStream,
+ sync::client::ClientBuilder,
+ WebSocketError
+};
/// A Shard is a higher-level handler for a websocket connection to Discord's
/// gateway. The shard allows for sending and receiving messages over the