diff options
| author | acdenisSK <[email protected]> | 2018-03-29 12:10:43 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2018-03-29 12:11:23 +0200 |
| commit | 4c05e828d5191975ef1a5e1ac581b646a69d2c25 (patch) | |
| tree | fb583f88a1e5d192651b399aca1839f3f58e661e /src/gateway/shard.rs | |
| parent | Add a connection timeout (diff) | |
| download | serenity-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.rs | 26 |
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 |