From 0a85882268860c3fc9eb590ec14d47ee3f4e16b6 Mon Sep 17 00:00:00 2001 From: Claas Date: Sun, 2 Feb 2025 17:45:35 +0100 Subject: [PATCH] Add macro to make parameterized redirects easier to write --- tugboat/src/macro.rs | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tugboat/src/macro.rs diff --git a/tugboat/src/macro.rs b/tugboat/src/macro.rs new file mode 100644 index 0000000..5b963f9 --- /dev/null +++ b/tugboat/src/macro.rs @@ -0,0 +1,6 @@ +#[macro_export] +macro_rules! redirect_to { + ($($arg:tt)*) => { + Redirect::to(&format!($($arg)*)) + }; +} -- 2.51.2