btree: move CellArray struct declaration next to impl

This commit is contained in:
Jussi Saurio
2025-04-14 15:19:56 +03:00
parent d961baf5ac
commit 930f1d79b4

View File

@@ -366,12 +366,6 @@ pub struct BTreeCursor {
empty_record: Cell<bool>,
}
struct CellArray {
cells: Vec<&'static mut [u8]>, // TODO(pere): make this with references
number_of_cells_per_page: Vec<u16>, // number of cells in each page
}
impl BTreeCursor {
pub fn new(
mv_cursor: Option<Rc<RefCell<MvCursor>>>,
@@ -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<u16>, // number of cells in each page
}
impl CellArray {
pub fn cell_size(&self, cell_idx: usize) -> u16 {
self.cells[cell_idx].len() as u16