diff --git a/gossip/src/cluster_info.rs b/gossip/src/cluster_info.rs index e7270ac265..e8da8ef426 100644 --- a/gossip/src/cluster_info.rs +++ b/gossip/src/cluster_info.rs @@ -2820,7 +2820,7 @@ impl Node { } pub fn new_localhost_with_pubkey(pubkey: &Pubkey) -> Self { let localhost_ip_addr = IpAddr::V4(Ipv4Addr::LOCALHOST); - let localhost_bind_addr = format!("{:?}:0", localhost_ip_addr); + let localhost_bind_addr = format!("{localhost_ip_addr:?}:0"); let unspecified_bind_addr = format!("{:?}:0", IpAddr::V4(Ipv4Addr::UNSPECIFIED)); let port_range = (1024, 65535); diff --git a/program-runtime/src/loaded_programs.rs b/program-runtime/src/loaded_programs.rs index b1619766ec..f5c4483bd9 100644 --- a/program-runtime/src/loaded_programs.rs +++ b/program-runtime/src/loaded_programs.rs @@ -48,8 +48,10 @@ pub trait WorkingSlot { fn is_ancestor(&self, other: Slot) -> bool; } +#[derive(Default)] pub enum LoadedProgramType { /// Tombstone for undeployed, closed or unloadable programs + #[default] Invalid, LegacyV0(VerifiedExecutable>), LegacyV1(VerifiedExecutable>), @@ -68,12 +70,6 @@ impl Debug for LoadedProgramType { } } -impl Default for LoadedProgramType { - fn default() -> Self { - LoadedProgramType::Invalid - } -} - #[derive(Debug, Default)] pub struct LoadedProgram { /// The program of this entry