Skip to content

Commit

Permalink
feat: 短路与优化折叠判断访问磁盘次数
Browse files Browse the repository at this point in the history
  • Loading branch information
someoneonsmile committed Aug 13, 2023
1 parent 3eac363 commit 6499e80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/merge_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl MergeTree {
foldable &= sub_result.foldable;
}
// is there has other tree file?
foldable &= !util::has_new_sub(&self.target, &self.source)?;
foldable = foldable && !util::has_new_sub(&self.target, &self.source)?;

// fold dir
if let Some(true) = self.option.as_ref().and_then(|it| it.fold) {
Expand Down

0 comments on commit 6499e80

Please sign in to comment.