(name: &'static str, value: f64)
| 269 | } |
| 270 | |
| 271 | fn validate_positive(name: &'static str, value: f64) -> Result<(), StrategyRiskError> { |
| 272 | if !value.is_finite() || value <= 0.0 { |
| 273 | return Err(StrategyRiskError::InvalidInput(name)); |
| 274 | } |
| 275 | Ok(()) |
| 276 | } |
| 277 | |
| 278 | fn validate_precision(precision: f64) -> Result<(), StrategyRiskError> { |
| 279 | if !precision.is_finite() || !(0.0..=1.0).contains(&precision) { |
no outgoing calls
no test coverage detected