From d7bee9912950483ce7047c1f91d684ef76fe1f98 Mon Sep 17 00:00:00 2001 From: Sunil Nimmagadda Date: Mon, 18 Nov 2024 22:54:37 +0530 Subject: Implement From trait from VRRPv2Error and use ? everywhere. --- src/vrrpv2.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/vrrpv2.rs b/src/vrrpv2.rs index 7ef30f3..8adf7f0 100644 --- a/src/vrrpv2.rs +++ b/src/vrrpv2.rs @@ -62,6 +62,12 @@ impl From for VRRPv2Error { } } +impl From for VRRPv2Error { + fn from(_err: std::io::Error) -> VRRPv2Error { + VRRPv2Error::ParseError + } +} + #[derive(Debug, PartialEq)] pub enum VRRPv2AuthType { VRRPv2AuthNoAuth = 0x00, -- cgit v1.2.3