diff options
Diffstat (limited to 'src')
-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] |