Skip to content

Commit

Permalink
chore(launchpad): clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandSherwin authored and joshuef committed Jun 4, 2024
1 parent 96ae819 commit 07e1538
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
5 changes: 3 additions & 2 deletions node-launchpad/src/components/home.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,10 @@ impl Component for Home {
Cell::new("Storage Allocated".to_string()).fg(GHOST_WHITE),
Cell::new(format!("{} GB", self.nodes_to_start * GB_PER_NODE)).fg(GHOST_WHITE),
]);
let memory_use_val = if self.node_stats.memory_usage_mb as f64 / 1024 as f64 > 1.0 {
let memory_use_val = if self.node_stats.memory_usage_mb as f64 / 1024_f64 > 1.0 {
format!(
"{:.2} GB",
self.node_stats.memory_usage_mb as f64 / 1024 as f64
self.node_stats.memory_usage_mb as f64 / 1024_f64
)
} else {
format!("{} MB", self.node_stats.memory_usage_mb)
Expand Down Expand Up @@ -617,6 +617,7 @@ fn maintain_n_running_nodes(
true,
count,
None,
true,
None,
false,
false,
Expand Down
9 changes: 4 additions & 5 deletions node-launchpad/src/node_stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,13 @@ impl NodeStats {
}
})
.collect::<Vec<_>>();
if node_details.is_empty() {
info!("No running nodes to fetch stats from.");
return;
} else {
info!("Fetching stats from {} nodes", node_details.len());
if !node_details.is_empty() {
debug!("Fetching stats from {} nodes", node_details.len());
tokio::task::spawn_local(async move {
Self::fetch_all_node_stats_inner(node_details, action_sender).await;
});
} else {
debug!("No running nodes to fetch stats from.");
}
}

Expand Down

0 comments on commit 07e1538

Please sign in to comment.