extract constant min_header_size

This commit is contained in:
Pere Diaz Bou
2025-03-30 11:12:11 +02:00
parent 8d74f4b8ab
commit 578bc9e3e6

View File

@@ -766,7 +766,8 @@ impl ImmutableRecord {
size_values += value_size;
}
let mut header_size = size_header;
if header_size <= 126 {
const MIN_HEADER_SIZE: usize = 126;
if header_size <= MIN_HEADER_SIZE {
// common case
// This case means the header size can be contained by a single byte, therefore
// header_size == size of serial types + 1 byte from the header size