- print_hex_compare(&hash_hex, &other_hex, &mut stdout)?;
- print_hex_compare(&other_hex, &hash_hex, &mut stdout)?;
+ let matches = calculate_match_indices(&hash.bytes, &verify_hash.bytes);
+ let any_wrong = matches.iter().any(|m| !*m);
+
+ if any_wrong && no_colour {
+ print_pointer_line(&matches, "v", &mut stdout)?;
+ }
+ print_hex_compare(&hash.bytes, &matches, &mut stdout)?;
+ print_hex_compare(&verify_hash.bytes, &matches, &mut stdout)?;
+ if any_wrong && no_colour {
+ print_pointer_line(&matches, "^", &mut stdout)?;
+ }