aboutsummaryrefslogtreecommitdiff
path: root/just_template/src/deprecated.rs
diff options
context:
space:
mode:
Diffstat (limited to 'just_template/src/deprecated.rs')
-rw-r--r--just_template/src/deprecated.rs45
1 files changed, 0 insertions, 45 deletions
diff --git a/just_template/src/deprecated.rs b/just_template/src/deprecated.rs
deleted file mode 100644
index b218969..0000000
--- a/just_template/src/deprecated.rs
+++ /dev/null
@@ -1,45 +0,0 @@
-#[macro_export]
-macro_rules! tmpl_param {
- ($template:ident, $($key:ident = $value:expr),* $(,)?) => {{
- $(
- $template.insert_param(stringify!($key).to_string(), $value.to_string());
- )*
- }};
-}
-
-#[macro_export]
-macro_rules! tmpl {
- ($template:ident, $($name:ident {
- $($key:ident = $value:expr),* $(,)?
- }),* $(,)?) => {{
- $(
- let $name = $template.add_impl(stringify!($name).to_string());
- $(
- $name.push({
- let mut params = std::collections::HashMap::new();
- params.insert(stringify!($key).to_string(), $value.to_string());
- params
- });
- )*
- )*
- }};
-
- // Old syntax
- ($template:ident += {
- $($name:ident {
- $(($($key:ident = $value:expr),* $(,)?)),*
- $(,)?
- }),*
- }) => {{
- $(
- let $name = $template.add_impl(stringify!($name).to_string());
- $(
- $name.push({
- let mut params = std::collections::HashMap::new();
- $(params.insert(stringify!($key).to_string(), $value.to_string());)*
- params
- });
- )*
- )*
- }};
-}