aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-08-03 17:51:36 +0200
committerThomas Voss <mail@thomasvoss.com> 2023-08-03 17:51:36 +0200
commite66f62cf543f231e0746c5aaf1ca546871a0448b (patch)
treec625fb65e38de4ada0879fbb1c6bc47d51f81c6d /src
parent5c60b2da59a76bb86f8ca51b0f35995b5c2538bd (diff)
Make $code an expr instead of tt
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 8726de5..691bc34 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -42,7 +42,7 @@ pub use std::{env, process};
/// [`errx(3)`]: https://man.openbsd.org/err.3
#[macro_export]
macro_rules! err_code {
- ($code:tt, $($fmt:tt)+) => {
+ ($code:expr, $($fmt:tt)+) => {
eprint!("{}: ", $crate::env::args().next().unwrap_or("Error".into()));
eprintln!($($fmt)*);
$crate::process::exit($code);