diff options
Diffstat (limited to 'src/display/ui_state.rs')
-rw-r--r-- | src/display/ui_state.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/display/ui_state.rs b/src/display/ui_state.rs index 83c1382..3469518 100644 --- a/src/display/ui_state.rs +++ b/src/display/ui_state.rs @@ -40,6 +40,7 @@ impl Bandwidth for NetworkData { } } +#[derive(Default)] pub struct UIState { pub processes: BTreeMap<String, NetworkData>, pub remote_ips: BTreeMap<Ipv4Addr, NetworkData>, @@ -49,7 +50,7 @@ pub struct UIState { impl UIState { pub fn new( connections_to_procs: HashMap<Connection, String>, - network_utilization: &Utilization, + network_utilization: Utilization, ) -> Self { let mut processes: BTreeMap<String, NetworkData> = BTreeMap::new(); let mut remote_ips: BTreeMap<Ipv4Addr, NetworkData> = BTreeMap::new(); |