summaryrefslogtreecommitdiff
path: root/src/bin/subplot.rs
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2021-08-07 15:37:51 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2021-09-07 17:32:16 +0100
commitb443c533f9e5a0bdbf8b380a8d7d59e46c28858b (patch)
treefe01f78e107ca092a3d13875ddff704c6ec2afce /src/bin/subplot.rs
parent1afd692bacf6c95d5897d4af74f6f2d4f8b91c1f (diff)
downloadsubplot-b443c533f9e5a0bdbf8b380a8d7d59e46c28858b.tar.gz
chore: Unwind global template name
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'src/bin/subplot.rs')
-rw-r--r--src/bin/subplot.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/subplot.rs b/src/bin/subplot.rs
index b8524e1..22eda3b 100644
--- a/src/bin/subplot.rs
+++ b/src/bin/subplot.rs
@@ -414,7 +414,12 @@ impl Codegen {
}
let spec = template_spec(&doc)?;
- generate_test_program(&mut doc, &spec, &self.output)?;
+ let template = doc
+ .meta()
+ .template_name()
+ .ok_or_else(|| anyhow::anyhow!("No template name given"))?
+ .to_string();
+ generate_test_program(&mut doc, &spec, &self.output, &template)?;
if self.run {
let run = match spec.run() {