diff -r 90d097c9ea62 -r 2470a15711b1 src/vrrpv2.rs --- a/src/vrrpv2.rs Tue Jan 02 14:52:44 2024 +0530 +++ b/src/vrrpv2.rs Sat Jan 06 22:50:47 2024 +0530 @@ -154,9 +154,7 @@ 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 @@ 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]