mirror of
https://github.com/GyulyVGC/sniffnet.git
synced 2026-10-24 16:11:59 +00:00
fix rust 1.73 new clippy lints
This commit is contained in:
parent
fbc072e51c
commit
afc574a88c
2 changed files with 3 additions and 4 deletions
|
|
@ -10,7 +10,6 @@ use pcap::{Active, Address, Capture, Device};
|
|||
use crate::countries::country_utils::get_country;
|
||||
use crate::networking::types::address_port_pair::AddressPortPair;
|
||||
use crate::networking::types::app_protocol::from_port_to_application_protocol;
|
||||
use crate::networking::types::data_info::DataInfo;
|
||||
use crate::networking::types::data_info_host::DataInfoHost;
|
||||
use crate::networking::types::filters::Filters;
|
||||
use crate::networking::types::host::Host;
|
||||
|
|
@ -285,7 +284,7 @@ pub fn reverse_dns_lookup(
|
|||
let other_data = info_traffic_lock
|
||||
.addresses_waiting_resolution
|
||||
.remove(&address_to_lookup)
|
||||
.unwrap_or(DataInfo::default());
|
||||
.unwrap_or_default();
|
||||
// insert the newly resolved host in the collections, with the data it exchanged so far
|
||||
info_traffic_lock
|
||||
.addresses_resolved
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ impl Default for PacketsNotification {
|
|||
impl PacketsNotification {
|
||||
/// Arbitrary string constructor. Will fallback values to existing notification if set, default() otherwise
|
||||
pub fn from(value: &str, existing: Option<Self>) -> Self {
|
||||
let default = existing.unwrap_or(Self::default());
|
||||
let default = existing.unwrap_or_default();
|
||||
|
||||
let new_threshold = if value.is_empty() {
|
||||
0
|
||||
|
|
@ -99,7 +99,7 @@ impl Default for BytesNotification {
|
|||
impl BytesNotification {
|
||||
/// Arbitrary string constructor. Will fallback values to existing notification if set, default() otherwise
|
||||
pub fn from(value: &str, existing: Option<Self>) -> Self {
|
||||
let default = existing.unwrap_or(Self::default());
|
||||
let default = existing.unwrap_or_default();
|
||||
|
||||
let mut byte_multiple_inserted = ByteMultiple::B;
|
||||
let new_threshold = if value.is_empty() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue