From df592184242b5c301dbad1a7dce5810e803fce33 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 12 Nov 2022 09:04:53 +0200 Subject: chore: use type alias to make code slightly more easier to follow Found by clippy. Sponsored-by: author --- subplotlib/src/step.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 StepResult>, + func: Box, reg: Box, } -- cgit v1.2.1