mirror of
https://github.com/domcyrus/rustnet.git
synced 2026-04-27 23:43:41 -05:00
chore: Remove unused imports and unreachable patterns
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
use anyhow::Result;
|
||||
use crossterm::event::{KeyCode, KeyEvent, KeyModifiers};
|
||||
use dns_lookup::lookup_addr;
|
||||
use std::collections::HashMap;
|
||||
use std::net::IpAddr;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
@@ -266,7 +266,6 @@ fn try_ss_command(connection: &Connection) -> Option<Process> {
|
||||
let proto_flag = match connection.protocol {
|
||||
Protocol::TCP => "-t",
|
||||
Protocol::UDP => "-u",
|
||||
_ => return None,
|
||||
};
|
||||
|
||||
let local_port = connection.local_addr.port();
|
||||
@@ -352,7 +351,6 @@ fn try_netstat_command(connection: &Connection) -> Option<Process> {
|
||||
fields[proto_idx].eq_ignore_ascii_case("udp")
|
||||
|| fields[proto_idx].eq_ignore_ascii_case("udp6")
|
||||
}
|
||||
_ => false,
|
||||
};
|
||||
|
||||
if matches_protocol
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
use anyhow::{anyhow, Result};
|
||||
use log::{debug, error, info};
|
||||
use maxminddb::geoip2;
|
||||
use log::{error, info};
|
||||
use pcap::{Capture, Device};
|
||||
use std::collections::HashMap;
|
||||
use std::net::{IpAddr, SocketAddr};
|
||||
|
||||
Reference in New Issue
Block a user