From 5d395d4ed73061b247c32dc63db6ddfa2dd62d39 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Wed, 4 Oct 2023 19:55:17 +0100 Subject: initial commit --- src/actix_ructe.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/actix_ructe.rs (limited to 'src/actix_ructe.rs') diff --git a/src/actix_ructe.rs b/src/actix_ructe.rs new file mode 100644 index 0000000..e6ba0db --- /dev/null +++ b/src/actix_ructe.rs @@ -0,0 +1,10 @@ +macro_rules! render { + ($template:path) => {{ + let mut buf = Vec::new(); + $template(&mut buf).map(|()| buf) + }}; + ($template:path, $($arg:expr),* $(,)*) => {{ + let mut buf = Vec::new(); + $template(&mut buf, $($arg),*).map(|()| buf) + }}; +} -- cgit