do not print parsed_result in invalid test
This commit is contained in:
parent
b998d47164
commit
951d0d7df8
10
src/proto.rs
10
src/proto.rs
@ -125,7 +125,7 @@ impl From<bool> for DNSMessageType {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct DNSHeader {
|
||||
/// used by the requester to match up replies to outstanding queries
|
||||
pub id: u16,
|
||||
@ -317,15 +317,13 @@ mod tests {
|
||||
dns_query[3] = (rcode as u8) << 0;
|
||||
|
||||
let parse_result = DNSHeader::from_udp_datagram(&dns_query);
|
||||
let parse_result_clone = parse_result.clone();
|
||||
|
||||
assert_eq!(
|
||||
parse_result.err(),
|
||||
Some(DNSParseError::DNSRCodeInvalid),
|
||||
"query: {:02x?}, rcode: {}, parsed_rcode: {:?}",
|
||||
parse_result,
|
||||
Err(DNSParseError::DNSRCodeInvalid),
|
||||
"query: {:02x?}, rcode: {}",
|
||||
dns_query,
|
||||
rcode,
|
||||
parse_result_clone.map(|x| x.response_code).unwrap()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user