diff options
Diffstat (limited to 'subplotlib/src/step.rs')
-rw-r--r-- | subplotlib/src/step.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/subplotlib/src/step.rs b/subplotlib/src/step.rs index bbea249..7a70e23 100644 --- a/subplotlib/src/step.rs +++ b/subplotlib/src/step.rs @@ -10,6 +10,8 @@ use std::panic::{catch_unwind, AssertUnwindSafe}; use crate::scenario::{Scenario, ScenarioContext}; use crate::types::StepResult; +type StepFunc = dyn Fn(&ScenarioContext, bool) -> StepResult; + /// A ScenarioStep is one step in a scenario. /// /// In essence, a scenario step is a named closure. Its name can be used when @@ -28,7 +30,7 @@ use crate::types::StepResult; /// ``` pub struct ScenarioStep { step_text: String, - func: Box<dyn Fn(&ScenarioContext, bool) -> StepResult>, + func: Box<StepFunc>, reg: Box<dyn Fn(&Scenario)>, } |