Skip to content

Commit

Permalink
refact: move is_active to serverInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
justRkive committed Sep 21, 2024
1 parent 5c7c4ff commit da81bb6
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/async_resolver/server_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ use crate::async_resolver::server_info::ServerInfo;
pub struct ServerEntry {
info: ServerInfo,
retransmissions: u32,
is_active: bool,
}

impl ServerEntry {
pub fn new(info: ServerInfo) -> ServerEntry {
ServerEntry {
info,
retransmissions: 0,
is_active: true,
// is_active: true,
}
}

Expand All @@ -32,12 +31,4 @@ impl ServerEntry {
pub fn reset_retransmissions(&mut self) {
self.retransmissions = 0;
}

pub fn is_active(&self) -> bool {
self.is_active
}

pub fn set_active(&mut self, is_active: bool) {
self.is_active = is_active;
}
}

0 comments on commit da81bb6

Please sign in to comment.