mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-25 23:29:58 -07:00
global: snapshot
This commit is contained in:
@@ -45,7 +45,7 @@ pub trait DynamicVec: Send + Sync {
|
||||
.map(Value::Owned))
|
||||
}
|
||||
fn get_stored_(&self, index: usize, mmap: &Mmap) -> Result<Option<Self::T>>;
|
||||
fn get_last(&self) -> Result<Option<Value<Self::T>>> {
|
||||
fn last(&self) -> Result<Option<Value<Self::T>>> {
|
||||
let len = self.len();
|
||||
if len == 0 {
|
||||
return Ok(None);
|
||||
|
||||
@@ -98,30 +98,6 @@ where
|
||||
Self::I::to_string()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn iter<F>(&mut self, f: F) -> Result<()>
|
||||
where
|
||||
F: FnMut(
|
||||
(
|
||||
Self::I,
|
||||
Self::T,
|
||||
&mut dyn DynamicVec<I = Self::I, T = Self::T>,
|
||||
),
|
||||
) -> Result<()>,
|
||||
{
|
||||
self.iter_from(Self::I::default(), f)
|
||||
}
|
||||
|
||||
fn iter_from<F>(&mut self, index: Self::I, f: F) -> Result<()>
|
||||
where
|
||||
F: FnMut(
|
||||
(
|
||||
Self::I,
|
||||
Self::T,
|
||||
&mut dyn DynamicVec<I = Self::I, T = Self::T>,
|
||||
),
|
||||
) -> Result<()>;
|
||||
|
||||
fn flush(&mut self) -> Result<()>;
|
||||
|
||||
fn truncate_if_needed(&mut self, index: Self::I) -> Result<()>;
|
||||
|
||||
Reference in New Issue
Block a user