(name: &'static str, value: f64)
| 440 | } |
| 441 | |
| 442 | fn validate_non_negative_finite(name: &'static str, value: f64) -> Result<(), StreamingHpcError> { |
| 443 | if !value.is_finite() || value < 0.0 { |
| 444 | return Err(StreamingHpcError::InvalidEvent(name)); |
| 445 | } |
| 446 | Ok(()) |
| 447 | } |
| 448 | |
| 449 | fn validate_event(event: StreamEvent) -> Result<(), StreamingHpcError> { |
| 450 | if !event.price.is_finite() || event.price <= 0.0 { |
no outgoing calls
no test coverage detected