Merge branch '2020-06-19-use-anyhow' into 2020-06-13-thin-check-rewrite

This commit is contained in:
Joe Thornber
2020-06-22 10:16:27 +01:00
43 changed files with 1880 additions and 273 deletions

View File

@@ -1,3 +1,4 @@
use anyhow::Result;
use crate::block_manager::*;
use crate::checksum::*;
@@ -47,7 +48,7 @@ use SuperblockDamage::*;
//------------------------------
pub fn check_type(b: &Block) -> Result<(), Box<dyn CheckError>> {
pub fn check_type(b: &Block) -> Result<()> {
match metadata_block_type(&b.data[0..]) {
SUPERBLOCK => Ok(()),
NODE => Err(Box::new(BadBlockType("BTree Node"))),