mirror of
https://github.com/posborne/rust-pstree.git
synced 2024-12-26 06:56:07 +01:00
rustup: update to run on the latest rust nightlies
Signed-off-by: Paul Osborne <osbpau@gmail.com>
This commit is contained in:
parent
99b4bdd596
commit
fe0ed22080
1 changed files with 2 additions and 5 deletions
|
@ -27,10 +27,7 @@
|
||||||
// of different items, notably the process name and its parent process id (ppid).
|
// of different items, notably the process name and its parent process id (ppid).
|
||||||
// And with that information, we can build the process tree.
|
// And with that information, we can build the process tree.
|
||||||
|
|
||||||
#![feature(std_misc)] // hash_map::Entry
|
#![feature(path_ext)]
|
||||||
#![feature(path)]
|
|
||||||
#![feature(fs)]
|
|
||||||
#![feature(io)]
|
|
||||||
|
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
@ -127,7 +124,7 @@ fn populate_node_helper(node: &mut ProcessTreeNode, pid_map: &HashMap<i32, &Proc
|
||||||
match ppid_map.get(&pid) {
|
match ppid_map.get(&pid) {
|
||||||
Some(children) => {
|
Some(children) => {
|
||||||
child_nodes.extend(children.iter().map(|child_pid| {
|
child_nodes.extend(children.iter().map(|child_pid| {
|
||||||
let record = pid_map[*child_pid];
|
let record = pid_map[child_pid];
|
||||||
let mut child = ProcessTreeNode::new(record);
|
let mut child = ProcessTreeNode::new(record);
|
||||||
populate_node_helper(&mut child, pid_map, ppid_map);
|
populate_node_helper(&mut child, pid_map, ppid_map);
|
||||||
child
|
child
|
||||||
|
|
Loading…
Reference in a new issue