diff options
author | Sunil Nimmagadda <sunil@nimmagadda.net> | 2024-11-18 22:54:37 +0530 |
---|---|---|
committer | Sunil Nimmagadda <sunil@nimmagadda.net> | 2024-11-19 18:41:03 +0530 |
commit | d7bee9912950483ce7047c1f91d684ef76fe1f98 (patch) | |
tree | 403d54ddec05e13581aaa1dc3e47de67e284ef79 /src | |
parent | 6733f900364de401b80d872db7baaa1b683c442a (diff) |
Implement From trait from VRRPv2Error and use ? everywhere.
Diffstat (limited to 'src')
-rw-r--r-- | src/vrrpv2.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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<std::io::Error> for VRRPv2Error { } } +impl From<std::io::Error> for VRRPv2Error { + fn from(_err: std::io::Error) -> VRRPv2Error { + VRRPv2Error::ParseError + } +} + #[derive(Debug, PartialEq)] pub enum VRRPv2AuthType { VRRPv2AuthNoAuth = 0x00, |