(values: &[T], field: &str)
| 936 | } |
| 937 | |
| 938 | fn ensure_strictly_sorted<T: Ord>(values: &[T], field: &str) -> Result<(), OperationCodecError> { |
| 939 | if values.windows(2).any(|pair| pair[0] >= pair[1]) { |
| 940 | return Err(OperationCodecError::new(format!( |
| 941 | "{field} must be strictly sorted and unique" |
| 942 | ))); |
| 943 | } |
| 944 | Ok(()) |
| 945 | } |
| 946 | |
| 947 | fn ensure_git_ref_observations_sorted( |
| 948 | values: &[GitRefObservation], |
no outgoing calls
no test coverage detected