Skip to content

Commit

Permalink
fix rust 1.73 new clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
GyulyVGC committed Oct 13, 2023
1 parent fbc072e commit afc574a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/networking/manage_packets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/notifications/types/notifications.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit afc574a

Please sign in to comment.