From 785c3fdb032ec2675e106044ebec794155581017 Mon Sep 17 00:00:00 2001 From: Joao Severo Date: Thu, 24 Jul 2025 15:03:49 -0300 Subject: [PATCH] Split into two methods --- core/storage/sqlite3_ondisk.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/storage/sqlite3_ondisk.rs b/core/storage/sqlite3_ondisk.rs index 2139fa580..e7673f51b 100644 --- a/core/storage/sqlite3_ondisk.rs +++ b/core/storage/sqlite3_ondisk.rs @@ -666,8 +666,14 @@ impl PageContent { /// - left-most cell (the cell with the smallest key) first and /// - the right-most cell (the cell with the largest key) last. pub fn cell_pointer_array_offset_and_size(&self) -> (usize, usize) { - let header_size = self.header_size(); - (self.offset + header_size, self.cell_pointer_array_size()) + ( + self.cell_pointer_array_offset(), + self.cell_pointer_array_size(), + ) + } + + pub fn cell_pointer_array_offset(&self) -> usize { + self.offset + self.header_size() } /// Get region(start end length) of a cell's payload