From c426fbe68dc2cc2dbeca2ca38747398eed03f5d5 Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Thu, 8 Feb 2024 22:05:03 -0500 Subject: [PATCH] fix(test-support): remove special case for `$message_type` --- crates/cargo-test-support/src/compare.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/crates/cargo-test-support/src/compare.rs b/crates/cargo-test-support/src/compare.rs index b9194fcd0f1..7ebb330f8ce 100644 --- a/crates/cargo-test-support/src/compare.rs +++ b/crates/cargo-test-support/src/compare.rs @@ -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 = - 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,