summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Nimmagadda <sunil@nimmagadda.net>2024-01-23 20:50:24 +0530
committerSunil Nimmagadda <sunil@nimmagadda.net>2024-01-23 20:50:24 +0530
commitd9170bd0853b82d74a6108cfa84f74a2582fbfa8 (patch)
treea9f604a840bf756fa9970dd4e445662844c49087
parentf2d7b7aa9d8a5f10dca015b7262c4fdd2d6102ac (diff)
Note about as_chunks API.
-rw-r--r--src/vrrpv2.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vrrpv2.rs b/src/vrrpv2.rs
index 6fc80a3..e0f45a6 100644
--- a/src/vrrpv2.rs
+++ b/src/vrrpv2.rs
@@ -163,6 +163,7 @@ pub fn from_bytes(bytes: &[u8]) -> Result<VRRPv2, VRRPv2Error> {
Ok(vrrpv2)
}
+/// TODO: as_chunks is nicer but not stabilised yet.
fn checksum(bytes: &[u8]) -> u16 {
let mut sum: u32 = 0;
for chunk in bytes.chunks(2) {