Skip to content

Commit 7ed20fb

Browse files
committed
Replace todo!() with proper error handling in deletion vector
- Replace todo!() macro with Error::DeletionVector for unsupported native serialization - Prevents potential panic in production code when encountering inline bitmaps with native serialization (magic number 1681511376) - Error message: 'Native serialization in inline bitmaps is not yet supported'
1 parent e10d72b commit 7ed20fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kernel/src/actions/deletion_vector.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,9 @@ impl DeletionVectorDescriptor {
164164
1681511377 => RoaringTreemap::deserialize_from(&byte_slice[4..])
165165
.map_err(|err| Error::DeletionVector(err.to_string())),
166166
1681511376 => {
167-
todo!("Don't support native serialization in inline bitmaps yet");
167+
Err(Error::DeletionVector(
168+
"Native serialization in inline bitmaps is not yet supported".to_string()
169+
))
168170
}
169171
_ => Err(Error::DeletionVector(format!("Invalid magic {magic}"))),
170172
}

0 commit comments

Comments
 (0)