(
field: &'static str,
hashes: &[Hash],
)
| 296 | } |
| 297 | |
| 298 | pub(crate) fn validate_canonical_hashes( |
| 299 | field: &'static str, |
| 300 | hashes: &[Hash], |
| 301 | ) -> Result<(), ChangeValidationError> { |
| 302 | for (index, hash) in hashes.iter().enumerate() { |
| 303 | if *hash == Hash::NONE { |
| 304 | return Err(ChangeValidationError::ZeroHash { field, index }); |
| 305 | } |
| 306 | if index > 0 && hashes[index - 1] >= *hash { |
| 307 | return Err(ChangeValidationError::NonCanonicalHashOrder { field, index }); |
| 308 | } |
| 309 | } |
| 310 | Ok(()) |
| 311 | } |
| 312 | |
| 313 | fn validate_git_algorithms( |
| 314 | origin: &'static str, |
no test coverage detected