fix rust 1.73 new clippy lints

This commit is contained in:
Giuliano Bellini s294739 2023-10-13 16:13:46 +02:00
parent fbc072e51c
commit afc574a88c
2 changed files with 3 additions and 4 deletions

View file

@ -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

View file

@ -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() {