Function
reject_duplicate_git_ref_names
(values: &[GitRefObservation])
Source from the content-addressed store, hash-verified
| 956 | } |
| 957 | |
| 958 | fn reject_duplicate_git_ref_names(values: &[GitRefObservation]) -> Result<(), OperationCodecError> { |
| 959 | if values.windows(2).any(|pair| pair[0].name == pair[1].name) { |
| 960 | return Err(OperationCodecError::new( |
| 961 | "Git ref observations contain duplicate names", |
| 962 | )); |
| 963 | } |
| 964 | Ok(()) |
| 965 | } |
| 966 | |
| 967 | fn hex_bytes(bytes: &[u8]) -> String { |
| 968 | const HEX: &[u8; 16] = b"0123456789abcdef"; |
Tested by
no test coverage detected