computer: convert stores to vecs part 2

This commit is contained in:
nym21
2025-07-16 16:23:40 +02:00
parent 1505454793
commit a0cfc1be2b
23 changed files with 749 additions and 340 deletions

View File

@@ -57,6 +57,7 @@ where
}
}
#[allow(unreachable_code, unused_variables)]
pub fn import(parent: &Path, name: &str, version: Version) -> Result<Self> {
panic!("Compressed vecs are a work in progress right now, please use raw vecs instead");

View File

@@ -62,6 +62,11 @@ where
self.0.mut_header().update_height(height);
}
pub fn reset(&mut self) -> Result<()> {
self.update_height(Height::ZERO);
self.0.reset()
}
pub fn truncate_if_needed(&mut self, index: I, height: Height) -> Result<()> {
self.update_height(height);
self.0.truncate_if_needed(index)?;