Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ogabrielides committed May 9, 2024
1 parent 0ee7265 commit a7e0008
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions grovedb/src/replication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,7 @@ impl GroveDb {
if state_sync_info.current_prefixes.is_empty() {
return Err(Error::InternalError("GroveDB is not in syncing mode"));
}
if let Some(subtree_state_sync) = state_sync_info.current_prefixes.remove(&chunk_prefix)
{
if let Some(subtree_state_sync) = state_sync_info.current_prefixes.remove(&chunk_prefix) {
if let Ok((res, mut new_subtree_state_sync)) =
self.apply_inner_chunk(subtree_state_sync, &chunk_id, chunk_data)
{
Expand All @@ -426,9 +425,7 @@ impl GroveDb {

// Subtree is finished. We can save it.
match new_subtree_state_sync.restorer.take() {
None => {
Err(Error::InternalError("Unable to finalize subtree"))
}
None => Err(Error::InternalError("Unable to finalize subtree")),
Some(restorer) => {
if (new_subtree_state_sync.num_processed_chunks > 0)
&& (restorer.finalize().is_err())
Expand Down

0 comments on commit a7e0008

Please sign in to comment.