summaryrefslogtreecommitdiff
path: root/src/vrrpv2.rs
diff options
context:
space:
mode:
authorSunil Nimmagadda <sunil@nimmagadda.net>2024-11-18 22:54:37 +0530
committerSunil Nimmagadda <sunil@nimmagadda.net>2024-11-19 18:41:03 +0530
commitd7bee9912950483ce7047c1f91d684ef76fe1f98 (patch)
tree403d54ddec05e13581aaa1dc3e47de67e284ef79 /src/vrrpv2.rs
parent6733f900364de401b80d872db7baaa1b683c442a (diff)
Implement From trait from VRRPv2Error and use ? everywhere.
Diffstat (limited to 'src/vrrpv2.rs')
-rw-r--r--src/vrrpv2.rs6
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,