diff options
Diffstat (limited to 'src/client/bridge/gateway/shard_runner.rs')
| -rw-r--r-- | src/client/bridge/gateway/shard_runner.rs | 6 |
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(), |