Skip to content

Commit

Permalink
Auto merge of #13424 - weihanglo:fix-13016, r=epage
Browse files Browse the repository at this point in the history
fix(test-support): remove special case for `$message_type`
  • Loading branch information
bors committed Feb 9, 2024
2 parents 99176ca + c426fbe commit af08da6
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions crates/cargo-test-support/src/compare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,18 +596,6 @@ fn find_json_mismatch_r<'a>(
let mut expected_entries = l.iter();
let mut actual_entries = r.iter();

// Compilers older than 1.76 do not produce $message_type.
// Treat it as optional for now.
let mut expected_entries_without_message_type;
let expected_entries: &mut dyn Iterator<Item = _> =
if l.contains_key("$message_type") && !r.contains_key("$message_type") {
expected_entries_without_message_type =
expected_entries.filter(|entry| entry.0 != "$message_type");
&mut expected_entries_without_message_type
} else {
&mut expected_entries
};

loop {
match (expected_entries.next(), actual_entries.next()) {
(None, None) => return None,
Expand Down

0 comments on commit af08da6

Please sign in to comment.