aboutsummaryrefslogtreecommitdiffstats
path: root/log_db/src/record.rs
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-01-08 10:12:19 +0200
committerJan Tuomi <jan@jantuomi.fi>2025-01-08 10:12:19 +0200
commitf19c7e6a41768e73a0f727deb22d65f1646a0777 (patch)
tree664e6e477d5be5e2c1e49a2d73d2bf4ec6ad521a /log_db/src/record.rs
parentbb64bc35beea7e0c46407b42a6240f084ccd137a (diff)
Replace iter() calls with into_iter(), add consistency asserts
Diffstat (limited to 'log_db/src/record.rs')
-rw-r--r--log_db/src/record.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/log_db/src/record.rs b/log_db/src/record.rs
index 8d518f0..61939e1 100644
--- a/log_db/src/record.rs
+++ b/log_db/src/record.rs
@@ -23,6 +23,8 @@ impl Record {
}
pub fn deserialize(bytes: &[u8]) -> Record {
+ assert!(bytes.len() > 0);
+
let mut values = Vec::new();
let tombstone = bytes[0] == B_TOMBSTONE;