diff options
author | Sunil Nimmagadda <sunil@nimmagadda.net> | 2024-11-24 10:34:32 +0530 |
---|---|---|
committer | Sunil Nimmagadda <sunil@nimmagadda.net> | 2024-11-24 10:34:32 +0530 |
commit | ec5906f32dba51b3ab1ea85c581de84f41088e5f (patch) | |
tree | 2f01a18ec21d9bda6f8acd069722a21b749aca7d | |
parent | 86db852b18229aa1277627ea5f3f13fa71040ed3 (diff) |
Merge two write_all.
-rw-r--r-- | src/vrrpv2.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/vrrpv2.rs b/src/vrrpv2.rs index 3ad19b6..df9d523 100644 --- a/src/vrrpv2.rs +++ b/src/vrrpv2.rs @@ -108,12 +108,11 @@ impl VRRPv2 { self.virtual_router_id, self.priority, self.count_ip_addrs, + self.auth_type as u8, + self.advertisement_interval, ] .as_ref(), )?; - wr.write_all( - [self.auth_type as u8, self.advertisement_interval].as_ref(), - )?; wr.write_all(self.checksum.to_be_bytes().as_ref())?; for ip in self.ip_addrs.iter() { wr.write_all(&ip.to_bits().to_be_bytes())?; |