summaryrefslogtreecommitdiff
path: root/src/matches.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/matches.rs')
-rw-r--r--src/matches.rs11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/matches.rs b/src/matches.rs
index 27a71e1..2c8f196 100644
--- a/src/matches.rs
+++ b/src/matches.rs
@@ -1,9 +1,7 @@
use crate::Bindings;
use crate::Result;
use crate::Scenario;
-use crate::ScenarioStep;
use crate::StepKind;
-use crate::SubplotError;
use serde::{Deserialize, Serialize};
@@ -20,7 +18,7 @@ impl MatchedScenario {
let steps: Result<Vec<MatchedStep>> = scen
.steps()
.iter()
- .map(|step| find_binding(step, bindings))
+ .map(|step| bindings.find(step))
.collect();
Ok(MatchedScenario {
title: scen.title().to_string(),
@@ -29,13 +27,6 @@ impl MatchedScenario {
}
}
-fn find_binding(step: &ScenarioStep, bindings: &Bindings) -> Result<MatchedStep> {
- match bindings.find(step) {
- None => Err(SubplotError::BindingUnknown(step.to_string())),
- Some(ms) => Ok(ms),
- }
-}
-
/// A matched binding and scenario step, with captured parts.
///
/// A MatchedStep is a sequence of partial steps, each representing