Skip to content

Commit e4d189d

Browse files
committed
fix: pass the correct max_depth into children
1 parent 08fcdd1 commit e4d189d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/tree_builder.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ where
4343
name,
4444
get_info,
4545
join_path,
46-
max_depth: current_depth,
46+
max_depth,
4747
} = builder;
4848

4949
let Info { size, children } = get_info(&path);
50-
let next_depth = current_depth.saturating_sub(1);
50+
let max_depth = max_depth.saturating_sub(1);
5151

5252
let children: Vec<_> = children
5353
.into_par_iter()
@@ -56,11 +56,11 @@ where
5656
name,
5757
get_info,
5858
join_path,
59-
max_depth: next_depth,
59+
max_depth,
6060
})
6161
.map(Self::from)
6262
.collect();
6363

64-
DataTree::dir(name, size, children, current_depth)
64+
DataTree::dir(name, size, children, max_depth)
6565
}
6666
}

0 commit comments

Comments
 (0)