mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-10 14:19:10 -07:00
global: rename some indexes
This commit is contained in:
@@ -3,6 +3,7 @@ use std::{fs, path::Path};
|
||||
use brk_core::{DateIndex, Height, Version};
|
||||
use brk_vec::{AnyVec, CollectableVec, Format, GenericStoredVec, StoredVec, VecIterator};
|
||||
|
||||
#[allow(clippy::upper_case_acronyms)]
|
||||
type VEC = StoredVec<DateIndex, u32>;
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
||||
@@ -42,14 +42,14 @@ where
|
||||
version = version + VERSION;
|
||||
let res = Self::import(parent, name, version);
|
||||
match res {
|
||||
// Err(Error::DifferentCompressionMode)
|
||||
// | Err(Error::WrongEndian)
|
||||
// | Err(Error::WrongLength)
|
||||
// | Err(Error::DifferentVersion { .. }) => {
|
||||
// let path = Self::path_(parent, name);
|
||||
// fs::remove_file(path)?;
|
||||
// Self::import(parent, name, version)
|
||||
// }
|
||||
Err(Error::DifferentCompressionMode)
|
||||
| Err(Error::WrongEndian)
|
||||
| Err(Error::WrongLength)
|
||||
| Err(Error::DifferentVersion { .. }) => {
|
||||
let path = Self::path_(parent, name);
|
||||
fs::remove_file(path)?;
|
||||
Self::import(parent, name, version)
|
||||
}
|
||||
_ => res,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user