summaryrefslogtreecommitdiff
path: root/src/matches.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/matches.rs')
-rw-r--r--src/matches.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/matches.rs b/src/matches.rs
index f8e527a..9130641 100644
--- a/src/matches.rs
+++ b/src/matches.rs
@@ -1,7 +1,7 @@
use crate::Binding;
-use crate::Result;
use crate::Scenario;
use crate::StepKind;
+use crate::SubplotError;
use crate::{bindings::CaptureType, Bindings};
use std::collections::HashMap;
@@ -17,8 +17,12 @@ pub struct MatchedScenario {
impl MatchedScenario {
/// Construct a new matched scenario
- pub fn new(template: &str, scen: &Scenario, bindings: &Bindings) -> Result<MatchedScenario> {
- let steps: Result<Vec<MatchedStep>> = scen
+ pub fn new(
+ template: &str,
+ scen: &Scenario,
+ bindings: &Bindings,
+ ) -> Result<MatchedScenario, SubplotError> {
+ let steps: Result<Vec<MatchedStep>, SubplotError> = scen
.steps()
.iter()
.map(|step| bindings.find(template, step))