Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rymnc committed Aug 8, 2023
1 parent 09b0756 commit 31ab316
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ where
// Load existing db instance
let db = D::load(db_config)?;

// Load root
// Load root
let root = match db.get(Key(0, 0).into())? {
Some(root) => H::deserialize(root),
None => H::default_leaf(),
Expand All @@ -101,7 +101,7 @@ where
// Load depth & next_index values from db
let depth = match db.get(DEPTH_KEY)? {
Some(depth) => usize::from_be_bytes(depth.try_into().unwrap()),
None => DEFAULT_TREE_DEPTH
None => DEFAULT_TREE_DEPTH,
};

let next_index = match db.get(NEXT_INDEX_KEY)? {
Expand Down

0 comments on commit 31ab316

Please sign in to comment.