From ab8df74ad7c4308b21690e508fd1cad61a57f8cf Mon Sep 17 00:00:00 2001 From: Sunil Nimmagadda Date: Sat, 6 Jan 2024 22:50:47 +0530 Subject: Fix clippy warnings. --- src/vrrpv2.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/vrrpv2.rs') 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] -- cgit v1.2.3