Skip to content
Myr

Support case when only step size is float

Before adoption: this commit came in with the history the project adopted, so no landing records it.

After this change, invokations like --parameter-scan t 0 1 --parameter-step-size 0.1 become valid

authored by Piyush Rungta · committed by David Peter · parent c73636c · Browse files · 1 file+5 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−2 removed

  • other:+5 added−2 removed

1 file+5 added−2 removed

modified:src/hyperfine/parameter_range.rs+5 added-2 removed
107 unmodified lines
108 let param_min = vals.next().unwrap();109 let param_max = vals.next().unwrap();110111 // attempt to parse as integers112 if let (Ok(param_min), Ok(param_max)) = (param_min.parse::<i32>(), param_max.parse::<i32>()) {113 let step = step.unwrap_or("1").parse::<i32>()?;112 if let (Ok(param_min), Ok(param_max), Ok(step)) = (113 param_min.parse::<i32>(),114 param_max.parse::<i32>(),115 step.unwrap_or("1").parse::<i32>(),116 ) {117 return build_parameterized_commands(118 param_min,119 param_max,120 step,
59 unmodified lines