Skip to content

Commit

Permalink
Simplify tree orphan step
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementTsang committed Sep 6, 2020
1 parent f442c50 commit 243a743
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/data_conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,14 +514,7 @@ pub fn tree_process_data(
});

// Turn the parent-child mapping into a "list" via DFS...
let mut pids_to_explore: VecDeque<Pid> = if cfg!(target_family = "windows") {
orphan_set.into_iter().collect()
} else if let Some(zero_pid) = parent_child_mapping.get(&0) {
// For Unix, our common root is 0.
zero_pid.clone().into_iter().collect()
} else {
VecDeque::default()
};
let mut pids_to_explore: VecDeque<Pid> = orphan_set.into_iter().collect();
let mut explored_pids: Vec<Pid> = vec![];
let mut lines: Vec<String> = vec![];

Expand Down

0 comments on commit 243a743

Please sign in to comment.