This commit is contained in:
arya2 2023-08-25 17:24:15 -04:00
parent 6748038aa7
commit 6df37fd05f
2 changed files with 4 additions and 4 deletions

View File

@ -354,7 +354,7 @@ impl AddressBook {
/// See [`AddressBook::is_ready_for_connection_attempt_with_ip`] for more details. /// See [`AddressBook::is_ready_for_connection_attempt_with_ip`] for more details.
fn should_update_most_recent_by_ip(&self, updated: MetaAddr) -> bool { fn should_update_most_recent_by_ip(&self, updated: MetaAddr) -> bool {
let Some(most_recent_by_ip) = self.most_recent_by_ip.as_ref() else { let Some(most_recent_by_ip) = self.most_recent_by_ip.as_ref() else {
return false return false;
}; };
if let Some(previous) = most_recent_by_ip.get(&updated.addr.ip()) { if let Some(previous) = most_recent_by_ip.get(&updated.addr.ip()) {
@ -369,7 +369,7 @@ impl AddressBook {
/// The entry is checked for an exact match to the IP and port of `addr`. /// The entry is checked for an exact match to the IP and port of `addr`.
fn should_remove_most_recent_by_ip(&self, addr: PeerSocketAddr) -> bool { fn should_remove_most_recent_by_ip(&self, addr: PeerSocketAddr) -> bool {
let Some(most_recent_by_ip) = self.most_recent_by_ip.as_ref() else { let Some(most_recent_by_ip) = self.most_recent_by_ip.as_ref() else {
return false return false;
}; };
if let Some(previous) = most_recent_by_ip.get(&addr.ip()) { if let Some(previous) = most_recent_by_ip.get(&addr.ip()) {

View File

@ -27,7 +27,7 @@ pub fn _run(
let Some(frontier) = tree.frontier() else { let Some(frontier) = tree.frontier() else {
prev_tree = Some(tree); prev_tree = Some(tree);
continue continue;
}; };
// Blocks cannot complete multiple level 16 subtrees, // Blocks cannot complete multiple level 16 subtrees,
@ -101,7 +101,7 @@ pub fn _run(
let Some(frontier) = tree.frontier() else { let Some(frontier) = tree.frontier() else {
prev_tree = Some(tree); prev_tree = Some(tree);
continue continue;
}; };
// Blocks cannot complete multiple level 16 subtrees, // Blocks cannot complete multiple level 16 subtrees,