Skip to content

Commit

Permalink
fmt issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lijunwangs committed Apr 14, 2023
1 parent 32ac7bb commit 6691a1b
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions rpc/src/optimistically_confirmed_bank_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,20 +561,11 @@ mod tests {
}

// Receive the Root notifications from the channel, if no item received within 100 ms, break and return all
// of the interested.
// of the received.
fn get_root_notifications(receiver: &Receiver<BankNotification>) -> Vec<BankNotification> {
let mut notifications = Vec::new();
loop {
match receiver.recv_timeout(Duration::from_millis(100)) {
Ok(notification) => {
if matches!(notification, BankNotification::Root(_)) {
notifications.push(notification);
}
}
Err(_) => {
break;
}
}
while let Ok(notification) = receiver.recv_timeout(Duration::from_millis(100)) {
notifications.push(notification);
}
notifications
}
Expand Down

0 comments on commit 6691a1b

Please sign in to comment.