Skip to content

Commit

Permalink
fix: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
KolbyML committed Jan 17, 2025
1 parent 190d01b commit 406edf0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/kbucket/bucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,7 @@ where
// Adjust `first_connected_pos` accordingly.
match old_status.state {
ConnectionState::Connected => {
if self.first_connected_pos.map_or(false, |p| p == pos.0)
&& pos.0 == self.nodes.len()
{
if (self.first_connected_pos == Some(pos.0)) && pos.0 == self.nodes.len() {
// It was the last connected node.
self.first_connected_pos = None
}
Expand Down

0 comments on commit 406edf0

Please sign in to comment.