(
value: f64,
multiplier: f64,
context: &str,
)
| 800 | } |
| 801 | |
| 802 | fn finite_non_negative_duration_ms( |
| 803 | value: f64, |
| 804 | multiplier: f64, |
| 805 | context: &str, |
| 806 | ) -> Result<u64, crate::error::AppError> { |
| 807 | if !value.is_finite() || value < 0.0 { |
| 808 | return Err(crate::error::AppError::bad_request(format!( |
| 809 | "{context} must be finite and non-negative." |
| 810 | ))); |
| 811 | } |
| 812 | Ok((value * multiplier).round() as u64) |
| 813 | } |
| 814 | |
| 815 | fn tokenize_step(line: &str) -> Result<Vec<String>, crate::error::AppError> { |
| 816 | enum State { |
no outgoing calls
no test coverage detected