There was an error while loading. Please reload this page.
1 parent cf98f49 commit 7353a85Copy full SHA for 7353a85
1 file changed
src/networking/manage_packets.rs
@@ -251,13 +251,13 @@ pub fn modify_or_insert_in_map(
251
// determine upper layer service
252
service = get_service(key, traffic_direction);
253
// determine process
254
- if let Some(local_port) = get_local_port(&key, traffic_direction) {
+ if let Some(local_port) = get_local_port(key, traffic_direction) {
255
let processes = listeners::get_processes_by_port(local_port);
256
process = processes
257
- .iter()
+ .into_iter()
258
.flatten()
259
.next()
260
- .map_or("?".to_string(), |p| p.name.to_owned());
+ .map_or("?".to_string(), |p| p.name);
261
}
262
};
263
0 commit comments