diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-08-03 17:51:36 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-08-03 17:51:36 +0200 |
commit | e66f62cf543f231e0746c5aaf1ca546871a0448b (patch) | |
tree | c625fb65e38de4ada0879fbb1c6bc47d51f81c6d | |
parent | 5c60b2da59a76bb86f8ca51b0f35995b5c2538bd (diff) |
Make $code an expr instead of tt
-rw-r--r-- | src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |