@@ -1,4 +1,5 @@
|
|||||||
[workspace]
|
[workspace]
|
||||||
|
resolver = "2"
|
||||||
members = [
|
members = [
|
||||||
"wakey",
|
"wakey",
|
||||||
"wakey-wake"
|
"wakey-wake"
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ fn main() -> wakey::Result<()> {
|
|||||||
.expect("Invalid MAC address format. Please use one of the separators: [:, -, /]");
|
.expect("Invalid MAC address format. Please use one of the separators: [:, -, /]");
|
||||||
let wol = wakey::WolPacket::from_string(&mac_adress, sep)?;
|
let wol = wakey::WolPacket::from_string(&mac_adress, sep)?;
|
||||||
if wol.send_magic().is_ok() {
|
if wol.send_magic().is_ok() {
|
||||||
println!("Sent the magic packet.");
|
println!("Sent the magic packet to {mac_adress}");
|
||||||
} else {
|
} else {
|
||||||
println!("Failed to send the magic packet.");
|
println!("Failed to send the magic packet.");
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -13,5 +13,5 @@ keywords = ["wol", "wake-on-lan"]
|
|||||||
categories = ["network-programming"]
|
categories = ["network-programming"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
hex = "~0.4"
|
hex = "0.4"
|
||||||
arrayvec = "0.7.2"
|
arrayvec = "0.7"
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ impl WolPacket {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the underlying WoL packet bytes
|
/// Returns the underlying WoL packet bytes
|
||||||
|
#[must_use]
|
||||||
pub fn into_inner(self) -> Packet {
|
pub fn into_inner(self) -> Packet {
|
||||||
self.packet
|
self.packet
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user