Skip to content

Commit

Permalink
fix: use is_empty() to make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
ckoopmann committed Aug 5, 2024
1 parent 8d83065 commit fb50bc5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/phoenix/consensus_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ impl ConsensusNodeMonitor {

info!("{}/{} consensus nodes synced", synced.len(), results.len());

if synced.len() > 0 {
Ok(Utc::now())
} else {
if synced.is_empty() {
Err(anyhow!("all consensus nodes out of sync"))
} else {
Ok(Utc::now())
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/phoenix/validation_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ impl ValidationNodeMonitor {

info!("{}/{} validation nodes synced", synced.len(), results.len());

if synced.len() > 0 {
Ok(Utc::now())
} else {
if synced.is_empty() {
Err(anyhow!("all validation nodes out of sync"))
} else {
Ok(Utc::now())
}
}
}
Expand Down

0 comments on commit fb50bc5

Please sign in to comment.