summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core.rs2
-rw-r--r--src/main.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core.rs b/src/core.rs
index 6ac3ba5..7e4aadb 100644
--- a/src/core.rs
+++ b/src/core.rs
@@ -116,7 +116,7 @@ pub enum RecordError {
impl std::fmt::Display for RecordError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
- RecordError::IO(err) => write!(f, "{}", err),
+ RecordError::IO(err) => write!(f, "{err}"),
RecordError::Interrupt => write!(f, "Received interrupt signal"),
}
}
diff --git a/src/main.rs b/src/main.rs
index b22d7e0..9c874ed 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -101,7 +101,7 @@ fn main() {
EXIT_FAILURE
}
Err(err) => {
- eprintln!("Error: {:?}", err);
+ eprintln!("Error: {err:?}");
match err.downcast_ref::<RecordError>() {
Some(RecordError::Interrupt) => EXIT_INTERRUPT,
_ => EXIT_FAILURE,
@@ -269,7 +269,7 @@ fn run() -> Result<(), anyhow::Error> {
"Changed: {:>width$}",
counter.get(&DiffKind::Changed).unwrap_or(&0)
);
- eprintln!("Total: {:>width$}", total);
+ eprintln!("Total: {total:>width$}");
}
if denied > 0 {
@@ -326,7 +326,7 @@ fn record<T: std::io::Write>(diff: &Diff, mut writer: T) -> Result<(), std::io::
};
if let Some(file) = file {
let s = serde_json::to_string(file).unwrap();
- writeln!(writer, "{}", s)
+ writeln!(writer, "{s}")
} else {
Ok(())
}
Generated by cgit. See skreutz.com for my tech blog and contact information.