diff --git a/runtime/runtime-params-estimator/src/lib.rs b/runtime/runtime-params-estimator/src/lib.rs index 1db2fe91adf..a39fb41787f 100644 --- a/runtime/runtime-params-estimator/src/lib.rs +++ b/runtime/runtime-params-estimator/src/lib.rs @@ -225,12 +225,10 @@ pub fn run(config: Config) -> CostTable { let mut res = CostTable::default(); for (cost, f) in ALL_COSTS.iter().copied() { - let skip = match &ctx.config.costs_to_measure { - None => false, - Some(costs) => !costs.contains(&format!("{:?}", cost)), - }; - if skip { - continue; + if let Some(costs) = &ctx.config.costs_to_measure { + if !costs.contains(&format!("{:?}", cost)) { + continue; + } } let start = Instant::now();