From be5f09fdd92dd1c97b52cdb8f1aea94e7a57a472 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Mon, 22 Apr 2024 18:00:58 +0800 Subject: [PATCH] Rename `Utilization::update` to `Utilization::ingest` --- src/main.rs | 2 +- src/network/utilization.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index cbac481dd..84e60517a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -279,7 +279,7 @@ where while running.load(Ordering::Acquire) { if let Some(segment) = sniffer.next() { - network_utilization.lock().unwrap().update(segment); + network_utilization.lock().unwrap().ingest(segment); } } }) diff --git a/src/network/utilization.rs b/src/network/utilization.rs index c44356b6e..6136513f7 100644 --- a/src/network/utilization.rs +++ b/src/network/utilization.rs @@ -24,7 +24,7 @@ impl Utilization { self.connections.clear(); clone } - pub fn update(&mut self, seg: Segment) { + pub fn ingest(&mut self, seg: Segment) { let total_bandwidth = self .connections .entry(seg.connection)