From e932c00e85689c327ada3e880808887768642304 Mon Sep 17 00:00:00 2001 From: Martin Frost Date: Mon, 13 Feb 2023 21:37:33 +0100 Subject: [PATCH] Use error variables directly in the format! string --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index e8ac5f8..56f453d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -60,7 +60,7 @@ pub fn get_available_coauthors() -> BTreeMap { match parse_coauthors_file() { Ok(coauthors) => coauthors, Err(e) => { - eprintln!("{}", e); + eprintln!("{e:?}"); BTreeMap::new() } } @@ -105,7 +105,7 @@ pub fn write_coauthors_file(authors: BTreeMap) { match fs::write(coauthors_file_path(), json_data) { Ok(_) => {} Err(e) => { - eprintln!("Error writing git-coauthors file: {:?}", e); + eprintln!("Error writing git-coauthors file: {e:?}"); process::exit(1); } }