diff --git a/src/gui/sniffer.rs b/src/gui/sniffer.rs index a2907f30..5b0696ec 100644 --- a/src/gui/sniffer.rs +++ b/src/gui/sniffer.rs @@ -264,7 +264,7 @@ fn time_subscription(&self) -> Subscription { sub.map(|_| Message::Quit) } } else { - iced::time::every(Duration::from_millis(1000)).map(|_| Message::Periodic) + iced::time::every(Duration::from_secs(1)).map(|_| Message::Periodic) } } diff --git a/src/networking/parse_packets.rs b/src/networking/parse_packets.rs index f23a3379..b18981d8 100644 --- a/src/networking/parse_packets.rs +++ b/src/networking/parse_packets.rs @@ -120,7 +120,7 @@ pub fn parse_packets( let mut pending_hosts = Vec::new(); while !resolutions_state.addresses_waiting_resolution.is_empty() { pending_hosts.extend(resolutions_state.new_hosts_to_send()); - thread::sleep(Duration::from_millis(1000)); + thread::sleep(Duration::from_secs(1)); } // send one last message including all pending hosts let _ = tx @@ -479,9 +479,9 @@ fn maybe_send_tick_run_live( tx: &Sender, resolutions_state: &mut AddressesResolutionState, ) { - if first_packet_ticks.is_some_and(|i| i.elapsed() >= Duration::from_millis(1000)) { + if first_packet_ticks.is_some_and(|i| i.elapsed() >= Duration::from_secs(1)) { *first_packet_ticks = - first_packet_ticks.and_then(|i| i.checked_add(Duration::from_millis(1000))); + first_packet_ticks.and_then(|i| i.checked_add(Duration::from_secs(1))); let _ = tx.send_blocking(BackendTrafficMessage::TickRun( cap_id, info_traffic_msg.take_but_leave_something(), diff --git a/src/networking/traffic_preview.rs b/src/networking/traffic_preview.rs index b0addd0e..c534921e 100644 --- a/src/networking/traffic_preview.rs +++ b/src/networking/traffic_preview.rs @@ -35,9 +35,9 @@ pub fn traffic_preview(tx: &Sender) { return; } - if ticks.elapsed() >= Duration::from_millis(1000) { + if ticks.elapsed() >= Duration::from_secs(1) { ticks = ticks - .checked_add(Duration::from_millis(1000)) + .checked_add(Duration::from_secs(1)) .unwrap_or(Instant::now()); handle_devices_and_previews(&mut data, tx, &pcap_tx); } diff --git a/src/networking/types/my_link_type.rs b/src/networking/types/my_link_type.rs index ad4ef221..cb7d19bf 100644 --- a/src/networking/types/my_link_type.rs +++ b/src/networking/types/my_link_type.rs @@ -61,7 +61,7 @@ pub fn full_print_on_one_line(self, language: Language) -> String { ) } Self::NotYetAssigned => { - format!("{}: -", link_type_translation(language),) + format!("{}: -", link_type_translation(language)) } } } diff --git a/src/networking/types/service_query.rs b/src/networking/types/service_query.rs index 514cc89a..e14aad5b 100644 --- a/src/networking/types/service_query.rs +++ b/src/networking/types/service_query.rs @@ -23,6 +23,6 @@ fn borrow(&self) -> &ServiceQuery { impl phf_shared::FmtConst for ServiceQuery { fn fmt_const(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let ServiceQuery(port, protocol) = self; - write!(f, "ServiceQuery({port}, Protocol::{protocol})",) + write!(f, "ServiceQuery({port}, Protocol::{protocol})") } }