Skip to content

Commit

Permalink
Rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
bootandy committed Jul 13, 2022
1 parent a00d1f0 commit fc70f9b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,19 @@ pub fn get_all_file_types(top_level_nodes: Vec<Node>, n: usize) -> Option<Displa

fn add_children<'a>(
using_a_filter: bool,
line: &'a Node,
file_or_folder: &'a Node,
depth: usize,
mut heap: BinaryHeap<&'a Node>,
) -> BinaryHeap<&'a Node> {
if depth > line.depth {
if depth > file_or_folder.depth {
if using_a_filter {
line.children.iter().for_each(|c| {
file_or_folder.children.iter().for_each(|c| {
if c.name.is_file() || c.size > 0 {
heap.push(c)
}
});
} else {
line.children.iter().for_each(|c| heap.push(c));
file_or_folder.children.iter().for_each(|c| heap.push(c));
}
}
heap
Expand Down

0 comments on commit fc70f9b

Please sign in to comment.