From 1b2324deeb48803d049421255b96d375306b4a6d Mon Sep 17 00:00:00 2001 From: Jeft <67933106+Jeftaei@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:15:39 -0500 Subject: [PATCH] stop macro from returning --- src/prelude.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/prelude.rs b/src/prelude.rs index 3f69da4..9721fda 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -7,13 +7,13 @@ pub type StdResult = std::result::Result; // so heres labelprint as a macro #[macro_export] macro_rules! lprint { - ($expr:expr) => { + ($expr:expr) => {{ let ___this_file = std::file!(); let ___line = std::line!(); // let ___column = column!(); println!("[{}:{}] {}", ___this_file, ___line, $expr); - }; - ($expr:expr, $($arg:tt)*) => { + }}; + ($expr:expr, $($arg:tt)*) => {{ lprint!(format!($expr, $($arg)*)); - }; + }}; } -- 2.45.2