aboutsummaryrefslogtreecommitdiff
path: root/src/client/bridge/gateway/shard_runner.rs
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-12-16 13:24:09 -0800
committerZeyla Hellyer <[email protected]>2017-12-16 13:24:09 -0800
commit9b53582f5e5e9650abda4106124e7f9f4e78a90c (patch)
tree88bd56a75b1d110ea049abbaea88bb6e8a83dac3 /src/client/bridge/gateway/shard_runner.rs
parentFix compilation of examples (diff)
downloadserenity-9b53582f5e5e9650abda4106124e7f9f4e78a90c.tar.xz
serenity-9b53582f5e5e9650abda4106124e7f9f4e78a90c.zip
Fix most clippy lints, take more refeernces
Fix clippy lints and subsequently accept references for more function parameters.
Diffstat (limited to 'src/client/bridge/gateway/shard_runner.rs')
-rw-r--r--src/client/bridge/gateway/shard_runner.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/bridge/gateway/shard_runner.rs b/src/client/bridge/gateway/shard_runner.rs
index 6ca73eb..a682693 100644
--- a/src/client/bridge/gateway/shard_runner.rs
+++ b/src/client/bridge/gateway/shard_runner.rs
@@ -143,7 +143,7 @@ impl<H: EventHandler + Send + Sync + 'static> ShardRunner<H> {
let (event, action, successful) = self.recv_event();
- if let Some(action) = action {
+ if let Some(ref action) = action {
let _ = self.action(action);
}
@@ -171,8 +171,8 @@ impl<H: EventHandler + Send + Sync + 'static> ShardRunner<H> {
/// # Errors
///
/// Returns
- fn action(&mut self, action: ShardAction) -> Result<()> {
- match action {
+ fn action(&mut self, action: &ShardAction) -> Result<()> {
+ match *action {
ShardAction::Autoreconnect => self.shard.autoreconnect(),
ShardAction::Heartbeat => self.shard.heartbeat(),
ShardAction::Identify => self.shard.identify(),