Skip to content

Commit

Permalink
rafs: refine builder Bootstrap implementation
Browse files Browse the repository at this point in the history
Refine builder Bootstrap implementation for maintenance.

Signed-off-by: Jiang Liu <[email protected]>
  • Loading branch information
jiangliu committed Mar 6, 2023
1 parent 4372f96 commit 7a226ce
Show file tree
Hide file tree
Showing 7 changed files with 559 additions and 547 deletions.
4 changes: 2 additions & 2 deletions rafs/src/builder/compact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -593,9 +593,9 @@ impl BlobCompactor {
return Ok(None);
}
let mut _dict = HashChunkDict::new(build_ctx.digester);
let mut tree = Tree::from_bootstrap(&rs, &mut _dict)?;
let tree = Tree::from_bootstrap(&rs, &mut _dict)?;
let mut bootstrap = Bootstrap::new()?;
bootstrap.build(&mut build_ctx, &mut bootstrap_ctx, &mut tree)?;
bootstrap.build(&mut build_ctx, &mut bootstrap_ctx, tree)?;
let mut nodes = Vec::new();
// move out nodes
std::mem::swap(&mut bootstrap_ctx.nodes, &mut nodes);
Expand Down
Loading

0 comments on commit 7a226ce

Please sign in to comment.