ts some minor update HOPEFULLY wont make it run 16k times worse HOPEFULLY

This commit is contained in:
lda
2026-04-15 03:26:26 +07:00 Unverified
parent 5fbe4b9d61
commit f59fd7a846
13 changed files with 96 additions and 77 deletions
+2 -1
View File
@@ -13,7 +13,7 @@ use wakey_core::{InterfaceAddr, InterfaceSummary};
/// Loopback is intentionally excluded.
pub async fn list_interface_summaries() -> Result<Vec<InterfaceSummary>> {
#[cfg(unix)]
let rows = address::nl::get(None)
let rows = address::nl::get(None) // <- why not do filtering here
.await
.context("rtnetlink address query failed")?;
@@ -22,6 +22,7 @@ pub async fn list_interface_summaries() -> Result<Vec<InterfaceSummary>> {
.await
.context("ip -j address show failed")?;
// convert semi raw [AddrOutput] into Almost the same [InterfaceSummary]
let mut out: Vec<InterfaceSummary> = rows
.into_iter()
.filter(|row| row.ifname != "lo")