diff options
| author | troido <troido@protonmail.com> | 2020-02-07 15:05:59 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-02-07 15:05:59 +0100 |
| commit | bed274c683ffd18a55282247d47780c4f1bf84b5 (patch) | |
| tree | 6e20e6ba099da68354e30b7f7450019188165159 /src/template.rs | |
| parent | 70db58f688f0dbdd69231da570cf8dbb54e5ca81 (diff) | |
all entity construction now uses new templates
Diffstat (limited to 'src/template.rs')
| -rw-r--r-- | src/template.rs | 8 |
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()) + } } |
