Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Adds tree view #223

Merged
merged 21 commits into from
Sep 7, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplify tree orphan step
  • Loading branch information
ClementTsang committed Sep 6, 2020
commit 243a74308ca8be35b6b63eade00d3d6a8021144b
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