From 930f1d79b46069a60a74e6c8e0aae8f2b5b83b4f Mon Sep 17 00:00:00 2001 From: Jussi Saurio Date: Mon, 14 Apr 2025 15:19:56 +0300 Subject: [PATCH] btree: move CellArray struct declaration next to impl --- core/storage/btree.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/storage/btree.rs b/core/storage/btree.rs index 211f9ab68..043e52e57 100644 --- a/core/storage/btree.rs +++ b/core/storage/btree.rs @@ -366,12 +366,6 @@ pub struct BTreeCursor { empty_record: Cell, } -struct CellArray { - cells: Vec<&'static mut [u8]>, // TODO(pere): make this with references - - number_of_cells_per_page: Vec, // number of cells in each page -} - impl BTreeCursor { pub fn new( mv_cursor: Option>>, @@ -3883,6 +3877,12 @@ impl PageStack { } } +struct CellArray { + cells: Vec<&'static mut [u8]>, // TODO(pere): make this with references + + number_of_cells_per_page: Vec, // number of cells in each page +} + impl CellArray { pub fn cell_size(&self, cell_idx: usize) -> u16 { self.cells[cell_idx].len() as u16