summaryrefslogtreecommitdiff
path: root/src/template.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-02-07 15:05:59 +0100
committertroido <troido@protonmail.com>2020-02-07 15:05:59 +0100
commitbed274c683ffd18a55282247d47780c4f1bf84b5 (patch)
tree6e20e6ba099da68354e30b7f7450019188165159 /src/template.rs
parent70db58f688f0dbdd69231da570cf8dbb54e5ca81 (diff)
all entity construction now uses new templates
Diffstat (limited to 'src/template.rs')
-rw-r--r--src/template.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/template.rs b/src/template.rs
index 51bba8b..b6b34cb 100644
--- a/src/template.rs
+++ b/src/template.rs
@@ -13,11 +13,15 @@ pub struct Template {
impl Template {
- pub fn empty(name: &str) -> Self {
+ pub fn new(name: &str, kwargs: HashMap<String, Parameter>) -> Self {
Self {
name: name.to_string(),
args: Vec::new(),
- kwargs: HashMap::new()
+ kwargs
}
}
+
+ pub fn empty(name: &str) -> Self {
+ Self::new(name, HashMap::new())
+ }
}