summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-12-05 11:45:56 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-12-21 08:39:33 +0000
commit2e841608a19fe781220863d1fcca6c4868ca4812 (patch)
treebe17bdb1c9733853451fd503f6a0d8b73a91d1f8 /templates
parenta1ffaea8703126af20f2a4a61fa53fea8c17e218 (diff)
downloadsubplot-2e841608a19fe781220863d1fcca6c4868ca4812.tar.gz
rust: Switch to a neater module based step function derive
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'templates')
-rw-r--r--templates/rust/template.rs.tera4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/rust/template.rs.tera b/templates/rust/template.rs.tera
index a60599f..c972d37 100644
--- a/templates/rust/template.rs.tera
+++ b/templates/rust/template.rs.tera
@@ -29,7 +29,7 @@ lazy_static! {
fn {{ scenario.title | nameslug }}() {
let mut scenario = Scenario::new(&base64_decode("{{scenario.title | base64}}"));
{% for step in scenario.steps %}
- let step = BUILDER_{{step.function}}::default()
+ let step = {{step.function}}::Builder::default()
{% for part in step.parts %}{% if part.CapturedText is defined -%}
{%- set name = part.CapturedText.name -%}
{%- set text = part.CapturedText.text -%}
@@ -58,7 +58,7 @@ fn {{ scenario.title | nameslug }}() {
{% endfor -%}
.build();
{%- if step.cleanup %}
- let cleanup = BUILDER_{{step.cleanup}}::default().build();
+ let cleanup = {{step.cleanup}}::Builder::default().build();
scenario.add_step(step, Some(cleanup));
{%- else %}
scenario.add_step(step, None);