From f0473e32eb97ae2d2168ddd3edd8726e37374771 Mon Sep 17 00:00:00 2001 From: Matt Palmer Date: Fri, 3 Mar 2023 14:27:18 +1100 Subject: [PATCH] Make clippy happy Surprised this didn't get picked up in PR CI. Mysteries abound. --- src/lib.rs | 6 +++--- src/log.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 2e1a2e1..12996ba 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -92,7 +92,7 @@ pub mod cli { let src = &match fs::read_to_string(path) { Ok(src) => src, Err(err) => { - eprintln!("Unable to read file: {}", err); + eprintln!("Unable to read file: {err}"); success = false; continue; } @@ -141,13 +141,13 @@ fn run(config: &RunConfig) -> ValidationState { Ok(doc) => match config.action_type { ActionType::Action => { if config.verbose { - log::log(&format!("Treating {} as an Action definition", file_name)); + log::log(&format!("Treating {file_name} as an Action definition")); } validate_as_action(&doc) } ActionType::Workflow => { if config.verbose { - log::log(&format!("Treating {} as a Workflow definition", file_name)); + log::log(&format!("Treating {file_name} as a Workflow definition")); } // TODO: Re-enable path and job validation let mut state = validate_as_workflow(&doc); diff --git a/src/log.rs b/src/log.rs index dbd1858..852ab4f 100644 --- a/src/log.rs +++ b/src/log.rs @@ -26,7 +26,7 @@ pub fn log(s: &str) { #[cfg(not(feature = "js"))] pub fn log(s: &str) { - println!("{}", s); + println!("{s}"); } #[cfg(feature = "js")] @@ -36,7 +36,7 @@ pub fn error(s: &str) { #[cfg(not(feature = "js"))] pub fn error(s: &str) { - eprintln!("{}", s); + eprintln!("{s}"); } #[cfg(feature = "js")] @@ -46,5 +46,5 @@ pub fn warn(s: &str) { #[cfg(not(feature = "js"))] pub fn warn(s: &str) { - eprintln!("{}", s); + eprintln!("{s}"); }