This commit is contained in:
lda
2025-12-07 16:03:38 +07:00 Unverified
parent fc6548e15c
commit af0682a1f0
7 changed files with 51 additions and 55 deletions
+1 -14
View File
@@ -107,20 +107,7 @@ pub async fn get_mac(
.await
.context("Calling ip -j neigh failed")?;
let lines = items
.into_iter()
.map(|item| IpNeighLine {
ip: item.ip,
dev: Some(item.dev),
mac: item.mac,
state: item
.state
.first()
.copied()
.map(Into::into)
.unwrap_or(NUDState::None),
})
.collect();
let lines = items.into_iter().map(Into::into).collect();
Ok(lines)
}