Function
required_f64
(args: &StepOptions, key: &str)
Source from the content-addressed store, hash-verified
| 600 | } |
| 601 | |
| 602 | fn required_f64(args: &StepOptions, key: &str) -> Result<f64, crate::error::AppError> { |
| 603 | args.value(key) |
| 604 | .ok_or_else(|| crate::error::AppError::bad_request(format!("Missing --{key}.")))? |
| 605 | .parse::<f64>() |
| 606 | .map_err(|_| crate::error::AppError::bad_request(format!("--{key} must be numeric."))) |
| 607 | } |
| 608 | |
| 609 | fn batch_selector_json(args: &StepOptions) -> Value { |
| 610 | serde_json::json!({ |
Tested by
no test coverage detected