diff --git a/src/bin/cibtool.rs b/src/bin/cibtool.rs index df9ff1e6..04fdc6ea 100644 --- a/src/bin/cibtool.rs +++ b/src/bin/cibtool.rs @@ -43,10 +43,10 @@ mod cibtoolcmd; fn main() { logger::open(logger::LogLevel::Info); if let Err(e) = fallible_main() { - eprintln!("ERROR: {}", e); + eprintln!("ERROR: {e}"); let mut e = e.source(); while let Some(source) = e { - eprintln!("caused by: {}", source); + eprintln!("caused by: {source}"); e = source.source(); } exit(1); diff --git a/src/bin/cibtoolcmd/event.rs b/src/bin/cibtoolcmd/event.rs index f533a9cf..7618ecac 100644 --- a/src/bin/cibtoolcmd/event.rs +++ b/src/bin/cibtoolcmd/event.rs @@ -39,11 +39,11 @@ impl Leaf for ListEvents { let events = events?; let json = serde_json::to_string_pretty(&events).map_err(CibToolError::EventListToJson)?; - println!("{}", json); + println!("{json}"); } else if self.verbose { for id in event_ids { if let Some(e) = db.get_queued_ci_event(&id)? { - println!("{id}: {:?}", e); + println!("{id}: {e:?}"); } else { println!("{id}: No such event"); } diff --git a/src/bin/cibtoolcmd/message.rs b/src/bin/cibtoolcmd/message.rs index 37f8b338..333b9cce 100644 --- a/src/bin/cibtoolcmd/message.rs +++ b/src/bin/cibtoolcmd/message.rs @@ -41,7 +41,7 @@ impl Leaf for MessageCmd { MessageKind::Failure => response_json(failure()?)?, }; - println!("{}", msg); + println!("{msg}"); Ok(()) } diff --git a/src/bin/cibtoolcmd/timeout.rs b/src/bin/cibtoolcmd/timeout.rs index 9d29e504..6c87ad76 100644 --- a/src/bin/cibtoolcmd/timeout.rs +++ b/src/bin/cibtoolcmd/timeout.rs @@ -98,7 +98,7 @@ impl Leaf for TimeoutCmd { println!("stdout bytes: {stdout_bytes}"); println!("duration: {} ms", elapsed.as_millis()); - println!("speed: {:.0} B/s", speed); + println!("speed: {speed:.0} B/s"); println!("exit: {}", tor.exit_code()); Ok(()) diff --git a/src/msg.rs b/src/msg.rs index d538e0a2..33271068 100644 --- a/src/msg.rs +++ b/src/msg.rs @@ -722,7 +722,7 @@ impl std::fmt::Display for Author { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{}", self.id)?; if let Some(alias) = &self.alias { - write!(f, " ({})", alias)?; + write!(f, " ({alias})")?; } Ok(()) } diff --git a/src/pages.rs b/src/pages.rs index 58b34c31..a3679169 100644 --- a/src/pages.rs +++ b/src/pages.rs @@ -337,7 +337,7 @@ impl PageData { fn per_repo_page_as_html(&self, rid: RepoId, alias: &str, timestamp: &str) -> HtmlPage { let mut doc = HtmlPage::default(); - let title = format!("CI runs for repository {}", alias); + let title = format!("CI runs for repository {alias}"); Self::head(&mut doc, &title); doc.push_to_body( diff --git a/src/run.rs b/src/run.rs index c8fa057d..52942862 100644 --- a/src/run.rs +++ b/src/run.rs @@ -177,7 +177,7 @@ impl fmt::Display for RunState { Self::Running => "running", Self::Triggered => "triggered", }; - write!(f, "{}", s) + write!(f, "{s}") } } diff --git a/src/sensitive.rs b/src/sensitive.rs index ad5eb35f..c4d72a02 100644 --- a/src/sensitive.rs +++ b/src/sensitive.rs @@ -34,14 +34,14 @@ pub struct Sensitive { impl fmt::Display for Sensitive { /// Serialize for normal output. fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { - write!(f, "{}", PLACEHOLDER) + write!(f, "{PLACEHOLDER}") } } impl fmt::Debug for Sensitive { /// Serialize for debug output. fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { - write!(f, "{}", PLACEHOLDER) + write!(f, "{PLACEHOLDER}") } }