Implement FoldMap's folds using a SumTree
This required passing a `Context` object to `Summary` and introducing a new `SeekDimension` trait that allows comparing two dimensions and pass an additional context object.
This commit is contained in:
@@ -536,6 +536,8 @@ impl Default for EntrySummary {
|
||||
}
|
||||
|
||||
impl sum_tree::Summary for EntrySummary {
|
||||
type Context = ();
|
||||
|
||||
fn add_summary(&mut self, rhs: &Self) {
|
||||
self.max_path = rhs.max_path.clone();
|
||||
self.file_count += rhs.file_count;
|
||||
|
||||
Reference in New Issue
Block a user