Skip to content

Commit

Permalink
Remove Shard::is_shutdown (#1414)
Browse files Browse the repository at this point in the history
This commit removes the `Shard::shutdown` field and the `Shard::is_shutdown` method. The method always returned false as `Shard::shutdown` was never modified anywhere, which left the method useless.
  • Loading branch information
rasm47 authored and arqunis committed Mar 15, 2022
1 parent 3b2b18c commit 0ccb793
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/gateway/shard.rs
Expand Up @@ -87,8 +87,6 @@ pub struct Shard {
seq: u64,
session_id: Option<String>,
shard_info: [u64; 2],
/// Whether the shard has permanently shutdown.
shutdown: bool,
stage: ConnectionStage,
/// Instant of when the shard was started.
// This acts as a timeout to determine if the shard has - for some reason -
Expand Down Expand Up @@ -154,7 +152,6 @@ impl Shard {
let session_id = None;

Ok(Shard {
shutdown: false,
client,
current_presence,
heartbeat_instants,
Expand All @@ -177,12 +174,6 @@ impl Shard {
&self.current_presence
}

/// Whether the shard has permanently shutdown.
#[inline]
pub fn is_shutdown(&self) -> bool {
self.shutdown
}

/// Retrieves the heartbeat instants of the shard.
///
/// This is the time of when a heartbeat was sent and when an
Expand Down

0 comments on commit 0ccb793

Please sign in to comment.