diff options
author | Krithic Kumar <30691152+notjedi@users.noreply.github.com> | 2024-03-18 10:59:47 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-18 13:29:47 +0800 |
commit | 1997bce393313d7ba685ee127d743e3a310530ac (patch) | |
tree | bf5190061ccba2e3ff8f703c39448b585f175ee0 /src/main.rs | |
parent | f892d2f758ea342ddbdb5d64eaed6e63fa8d1ddd (diff) |
feat: add `PID` column to `Process` table (#379)
* feat: add `PID` column to `Process` table
* fix(tests): populate fake data with the correct `ProcessInfo` type
* test: update snapshots
* refactor: use more idiomatic rust
* refactor: rename function from `get_proc_name` to `get_proc_info`
* refactor: only display PID when width available is highest
ref: https://github.com/imsnif/bandwhich/pull/165#issuecomment-620852892
* tests: update snapshots
* chore: update CHANGELOG
* fix: clippy warnings
* Revert "fix: clippy warnings"
This reverts commit e5f06cba1943d60b43a19957c42e3178c6916f69.
We will do this separately for the sake of keeping a clean history
* refactor: use `u32` for PID
* refactor: more idiomatic rust
---------
Co-authored-by: cyqsimon <28627918+cyqsimon@users.noreply.github.com>
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index a6a00d9..756e46d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -34,6 +34,7 @@ use ratatui::backend::{Backend, CrosstermBackend}; use simplelog::WriteLogger; use crate::cli::Opt; +use crate::os::ProcessInfo; const DISPLAY_DELTA: Duration = Duration::from_millis(1000); @@ -89,7 +90,7 @@ fn main() -> anyhow::Result<()> { } pub struct OpenSockets { - sockets_to_procs: HashMap<LocalSocket, String>, + sockets_to_procs: HashMap<LocalSocket, ProcessInfo>, } pub struct OsInputOutput { |