Skip to content

Commit

Permalink
Refactor inline enum structs into separate structs
Browse files Browse the repository at this point in the history
  • Loading branch information
oberien committed Mar 4, 2017
1 parent 91e278a commit aba3f6c
Show file tree
Hide file tree
Showing 3 changed files with 228 additions and 176 deletions.
4 changes: 2 additions & 2 deletions src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ impl Connection {
if let Event::VoiceStateUpdate(server_id, ref voice_state) = event {
self.voice(server_id).__update_state(voice_state);
}
if let Event::VoiceServerUpdate { server_id, channel_id: _, ref endpoint, ref token } = event {
self.voice(server_id).__update_server(endpoint, token);
if let Event::VoiceServerUpdate(ref update) = event {
self.voice(update.server_id).__update_server(&update.endpoint, &update.token);
}
}
return Ok(event);
Expand Down
Loading

0 comments on commit aba3f6c

Please sign in to comment.