diff --git a/src/actors/driven/for_formatting_message/alert_formatter.rs b/src/actors/driven/for_formatting_message/alert_formatter.rs index 83bef6a..9752c99 100644 --- a/src/actors/driven/for_formatting_message/alert_formatter.rs +++ b/src/actors/driven/for_formatting_message/alert_formatter.rs @@ -15,7 +15,7 @@ impl AlertFormatter { ("Swap", "CRITICAL") => "Swap saturated - Performance degraded!".to_string(), ("Disk", "WARNING") => "Low disk space".to_string(), ("Disk", "CRITICAL") => "Disk almost full - Urgent cleanup required!".to_string(), - (metric, _) => format!("Level '{}' problem detected on {}", level, metric), + (metric, _) => format!("Level '{level}' problem detected on {metric}"), } } } @@ -44,7 +44,7 @@ impl ForFormattingMessage for AlertFormatter { result.push_str( &metrics .iter() - .map(|(key, value)| format!("{}: {:.1}%", key, value)) + .map(|(key, value)| format!("{key}: {value:.1}%")) .collect::>() .join("\n"), ); diff --git a/src/main.rs b/src/main.rs index 61237ba..4799aeb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -47,12 +47,12 @@ fn main() { match cli.command { Commands::Run => { if let Err(e) = service.alert_on_threshold_violation() { - eprintln!("Error during threshold violation check: {}", e); + eprintln!("Error during threshold violation check: {e}"); } } Commands::Get => { if let Err(e) = service.send_all_metrics_notification() { - eprintln!("Error sending final notification: {}", e); + eprintln!("Error sending final notification: {e}"); } } }