Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
kimono-koans committed Jan 5, 2024
1 parent 1e25b61 commit 7317682
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/exec/deleted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ impl RecurseBehindDeletedDir {
};

while let Some(item) = queue.pop() {
item.vec_dirs
let new = item
.vec_dirs
.into_iter()
.take_while(|_| {
// check -- should deleted threads keep working?
Expand All @@ -192,13 +193,10 @@ impl RecurseBehindDeletedDir {
skim_tx,
)
})
.try_for_each(|res| {
res.map(|item| {
if !item.vec_dirs.is_empty() {
queue.push(item)
}
})
})?
.flatten()
.filter(|item| !item.vec_dirs.is_empty());

queue.extend(new);
}

Ok(())
Expand Down

0 comments on commit 7317682

Please sign in to comment.