Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates based on code review by @nastevens
This addresses the following feeback: Your code looks really good, and very Rustic. I only have a few comments: · In ProcessRecord you use isize for the pid and ppid. These aren’t really sizes, so I’d go with i32 · Line 102: since all you’re doing is panic!() on Err, you can just use .unwrap() · Line 107: you could use “filter_map” instead of filter and then “collect” the results. This eliminates the need for “mut records” on line 98 · Line 126: use “filter_map” · I’d add Cargo support · You could consider using a map type containing vector types for storing the ppid->pid translation. That would improve performance since the record list wouldn’t getting iterated over multiple times. Unfortunately Rust doesn’t have a multimap yet (see rust-lang/rfcs#784), otherwise you could just use that! Using a map type for the lookup is not supported with this but will be evaluated.
- Loading branch information