diff options
author | Sunil Nimmagadda <sunil@nimmagadda.net> | 2024-01-06 22:50:47 +0530 |
---|---|---|
committer | Sunil Nimmagadda <sunil@nimmagadda.net> | 2024-01-06 22:50:47 +0530 |
commit | ab8df74ad7c4308b21690e508fd1cad61a57f8cf (patch) | |
tree | f02ff8613decaa9bf5c9e6f5907b6b2c74677b4f /src/vrrpv2.rs | |
parent | 12344c24fe72d1fb7dae14360c483a2035acdaea (diff) |
Fix clippy warnings.
Diffstat (limited to 'src/vrrpv2.rs')
-rw-r--r-- | src/vrrpv2.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/vrrpv2.rs b/src/vrrpv2.rs index b6aa82f..baf69cf 100644 --- a/src/vrrpv2.rs +++ b/src/vrrpv2.rs @@ -154,9 +154,7 @@ fn test_invalid_version() { 0x31, 0x2a, 0x64, 0x1, 0x0, 0x1, 0xaa, 0x29, 0xc0, 0xa8, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ]; - let got = from_bytes(&bytes); - assert_eq!(got.is_err(), true); - assert_eq!(got.err(), Some(VRRPv2Error::InvalidVersion)); + assert_eq!(from_bytes(&bytes), Err(VRRPv2Error::InvalidVersion)); } #[test] @@ -165,9 +163,7 @@ fn test_invalid_type() { 0x20, 0x1, 0x2a, 0x0, 0x0, 0x1, 0xb5, 0xfd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ]; - let got = from_bytes(&bytes); - assert_eq!(got.is_err(), true); - assert_eq!(got.err(), Some(VRRPv2Error::InvalidType)); + assert_eq!(from_bytes(&bytes), Err(VRRPv2Error::InvalidType)); } #[test] |