diff --git a/gossip/src/crds_gossip_pull.rs b/gossip/src/crds_gossip_pull.rs index 7f2011178d..f137c2bab8 100644 --- a/gossip/src/crds_gossip_pull.rs +++ b/gossip/src/crds_gossip_pull.rs @@ -897,7 +897,7 @@ pub(crate) mod tests { .take(100) .filter(|peer| peer != old) .count(); - assert!(count < 75, "count of peer != old: {}", count); + assert!(count < 75, "count of peer != old: {count}"); } #[test] diff --git a/ledger-tool/src/output.rs b/ledger-tool/src/output.rs index c22c4ee506..46c2a62f1b 100644 --- a/ledger-tool/src/output.rs +++ b/ledger-tool/src/output.rs @@ -40,10 +40,10 @@ impl Display for SlotBounds<'_> { )?; if let Some(all_slots) = self.all_slots { - writeln!(f, "Non-empty slots: {:?}", all_slots)?; + writeln!(f, "Non-empty slots: {all_slots:?}")?; } } else { - writeln!(f, "Ledger has data for slot {:?}", first)?; + writeln!(f, "Ledger has data for slot {first:?}")?; } if self.roots.total > 0 { @@ -56,11 +56,7 @@ impl Display for SlotBounds<'_> { self.roots.total, first_rooted, last_rooted )?; - writeln!( - f, - " and {:?} slots past the last root", - num_after_last_root - )?; + writeln!(f, " and {num_after_last_root:?} slots past the last root")?; } else { writeln!(f, " with no rooted slots")?; } diff --git a/sdk/cargo-build-sbf/src/main.rs b/sdk/cargo-build-sbf/src/main.rs index 94cce7a9ba..4b495efeec 100644 --- a/sdk/cargo-build-sbf/src/main.rs +++ b/sdk/cargo-build-sbf/src/main.rs @@ -160,8 +160,7 @@ fn find_installed_sbf_tools(arch: &str) -> Vec { fn get_latest_sbf_tools_version() -> Result { let url = "https://github.com/solana-labs/sbf-tools/releases/latest"; - let resp = - reqwest::blocking::get(url).map_err(|err| format!("Failed to GET {}: {}", url, err))?; + let resp = reqwest::blocking::get(url).map_err(|err| format!("Failed to GET {url}: {err}"))?; let path = std::path::Path::new(resp.url().path()); let version = path.file_name().unwrap().to_string_lossy().to_string(); Ok(version) @@ -173,7 +172,7 @@ fn normalize_version(version: String) -> String { |n: u32, c| if *c == b'.' { n.saturating_add(1) } else { n }, ); if dots == 1 { - format!("{}.0", version) + format!("{version}.0") } else { version } diff --git a/validator/src/dashboard.rs b/validator/src/dashboard.rs index e1e30ef6d2..a904172cda 100644 --- a/validator/src/dashboard.rs +++ b/validator/src/dashboard.rs @@ -113,7 +113,7 @@ impl Dashboard { println_name_value("JSON RPC URL:", &format!("http://{rpc}")); } if let Some(pubsub) = contact_info.pubsub { - println_name_value("WebSocket PubSub URL:", &format!("ws://{}", pubsub)); + println_name_value("WebSocket PubSub URL:", &format!("ws://{pubsub}")); } }