diff options
| author | Zeyla Hellyer <[email protected]> | 2017-12-16 13:24:09 -0800 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-12-16 13:24:09 -0800 |
| commit | 9b53582f5e5e9650abda4106124e7f9f4e78a90c (patch) | |
| tree | 88bd56a75b1d110ea049abbaea88bb6e8a83dac3 /src/client/bridge/gateway/shard_runner.rs | |
| parent | Fix compilation of examples (diff) | |
| download | serenity-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.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(), |