aboutsummaryrefslogtreecommitdiff
path: root/src/client/gateway
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2016-11-25 20:37:44 -0800
committerAustin Hellyer <[email protected]>2016-11-25 20:37:44 -0800
commit65ccfa5686f63074907bcea934172e19e188f088 (patch)
tree4fbd948363986e2c9ac85feab3a6d8fba8a703e5 /src/client/gateway
parentRename PublicChannel to GuildChannel (diff)
downloadserenity-65ccfa5686f63074907bcea934172e19e188f088.tar.xz
serenity-65ccfa5686f63074907bcea934172e19e188f088.zip
Move events into their own module
The events were cluttering the `model` module, and so are now moved into their own `model::event` module. As users should not usually have to work with events all that much - only currently in some rarely used event handlers - this change should not be much more effort to import from. i.e.: ```rs use serenity::model::event::ChannelPinsAckEvent; ``` vs. the now-old: ```rs use serenity::model::ChannelPinsAckEvent; ```
Diffstat (limited to 'src/client/gateway')
-rw-r--r--src/client/gateway/prep.rs2
-rw-r--r--src/client/gateway/shard.rs11
2 files changed, 3 insertions, 10 deletions
diff --git a/src/client/gateway/prep.rs b/src/client/gateway/prep.rs
index bf4e9b3..e3b8656 100644
--- a/src/client/gateway/prep.rs
+++ b/src/client/gateway/prep.rs
@@ -17,7 +17,7 @@ use websocket::stream::WebSocketStream;
use ::constants::{self, OpCode};
use ::error::{Error, Result};
use ::internal::ws_impl::{ReceiverExt, SenderExt};
-use ::model::{Event, GatewayEvent, ReadyEvent};
+use ::model::event::{Event, GatewayEvent, ReadyEvent};
#[inline]
pub fn parse_ready(event: GatewayEvent,
diff --git a/src/client/gateway/shard.rs b/src/client/gateway/shard.rs
index 61bcafc..c35fee2 100644
--- a/src/client/gateway/shard.rs
+++ b/src/client/gateway/shard.rs
@@ -16,15 +16,8 @@ use websocket::ws::sender::Sender as WsSender;
use ::constants::OpCode;
use ::internal::prelude::*;
use ::internal::ws_impl::{ReceiverExt, SenderExt};
-use ::model::{
- ChannelId,
- Event,
- Game,
- GatewayEvent,
- GuildId,
- OnlineStatus,
- ReadyEvent,
-};
+use ::model::event::{Event, GatewayEvent, ReadyEvent};
+use ::model::{ChannelId, Game, GuildId, OnlineStatus};
#[cfg(feature="voice")]
use ::ext::voice::Manager as VoiceManager;