Simplify call to HeaderMismatch destructure
@@ -193,7 +193,7 @@ fn mismatch_message_generated_when_headers_are_not_equal() {
&mut mismatches, &None);
match mismatches[0] {
- Mismatch::HeaderMismatch {key: _, expected: _, actual: _, ref mismatch} =>
+ Mismatch::HeaderMismatch {ref mismatch, ..} =>
assert_eq!(mismatch, "Expected header 'HEADER' to have value 'HEADER_VALUE' but was 'HEADER2'"),
_ => panic!("Unexpected mismatch response")
}
@@ -278,7 +278,7 @@ fn mismatched_header_description_reports_content_type_mismatches_correctly() {
&mut mismatches, &None);
match mismatches[0] {
- Mismatch::HeaderMismatch {key: _, expected: _, actual: _, ref mismatch} =>
+ Mismatch::HeaderMismatch {ref mismatch, ..} =>
assert_eq!(mismatch, "Expected header 'CONTENT-TYPE' to have value 'CONTENT-TYPE-VALUE' but was 'HEADER2'"),
_ => panic!("Unexpected mismatch response")
}
@@ -322,7 +322,7 @@ fn mismatched_header_description_reports_accept_header_mismatches_correctly() {
match_header_value(&s!("ACCEPT"), &s!("ACCEPT-VALUE"), &s!("HEADER2"),
&mut mismatches, &None);
match mismatches[0] {
- Mismatch::HeaderMismatch { key: _, expected: _, actual: _, ref mismatch } =>
+ Mismatch::HeaderMismatch {ref mismatch, ..} =>
assert_eq!(mismatch, "Expected header 'ACCEPT' to have value 'ACCEPT-VALUE' but was 'HEADER2'"),
_ => panic!("Unexpected mismatch response")
}
