HOLY sweep
This commit is contained in:
@@ -75,7 +75,9 @@ pub async fn list_devs() -> HashSet<String> {
|
||||
if e.file_type()
|
||||
.map(|ft| {
|
||||
if ft.is_symlink() {
|
||||
std::fs::metadata(e.path()).map(|m| m.is_dir()).unwrap_or(false)
|
||||
std::fs::metadata(e.path())
|
||||
.map(|m| m.is_dir())
|
||||
.unwrap_or(false)
|
||||
} else {
|
||||
ft.is_dir()
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
pub mod dhcp;
|
||||
pub mod devices;
|
||||
pub mod dhcp;
|
||||
pub mod wake;
|
||||
|
||||
pub use dhcp::*;
|
||||
pub use devices::*;
|
||||
pub use dhcp::*;
|
||||
pub use wake::*;
|
||||
|
||||
@@ -68,11 +68,11 @@ pub async fn wake_many(
|
||||
.await?;
|
||||
sock.set_broadcast(true)?;
|
||||
|
||||
let iter = targets.into_iter().map(async |target| {
|
||||
match CompleteWakeTarget::try_from(target) {
|
||||
let iter = targets
|
||||
.into_iter()
|
||||
.map(async |target| match CompleteWakeTarget::try_from(target) {
|
||||
Ok(target) => wake_one(&sock, target).await,
|
||||
Err(()) => WakeTargetResult::incomplete(target),
|
||||
}
|
||||
});
|
||||
});
|
||||
Ok(futures::future::join_all(iter).await)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user