From 97f5ace71262a74f89a0e6e31ec7b849d81af147 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 3 Aug 2023 17:52:25 +0200 Subject: Use $($fmt)+ instead of $($fmt)* --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 691bc34..2cb67e3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -44,7 +44,7 @@ pub use std::{env, process}; macro_rules! err_code { ($code:expr, $($fmt:tt)+) => { eprint!("{}: ", $crate::env::args().next().unwrap_or("Error".into())); - eprintln!($($fmt)*); + eprintln!($($fmt)+); $crate::process::exit($code); }; } @@ -76,7 +76,7 @@ macro_rules! err_code { #[macro_export] macro_rules! err { ($($fmt:tt)+) => { - $crate::err_code!(1, $($fmt)*); + $crate::err_code!(1, $($fmt)+); } } @@ -119,6 +119,6 @@ macro_rules! err { macro_rules! warn { ($($fmt:tt)+) => { eprint!("{}: ", $crate::env::args().next().unwrap_or("Error".into())); - eprintln!($($fmt)*); + eprintln!($($fmt)+); }; } -- cgit v1.2.3