From c2280b350eb55da46657d300237313d41d7eaa76 Mon Sep 17 00:00:00 2001 From: rasul Date: Sat, 24 Oct 2020 10:07:49 -0500 Subject: [PATCH] macro to make returning error string easier --- src/macros.rs | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/macros.rs diff --git a/src/macros.rs b/src/macros.rs new file mode 100644 index 0000000..d440b19 --- /dev/null +++ b/src/macros.rs @@ -0,0 +1,6 @@ +#[macro_export] +macro_rules! serr { + ($($arg:tt)*) => { + Err(Box::from([$($arg)*].concat())); + }; +}