no need for match
This commit is contained in:
parent
922d7326df
commit
b3e2fd8c82
|
@ -12,9 +12,10 @@ Library for managing Wake-on-LAN packets. It supports:
|
||||||
From string representation of MAC address and using defaults when broadcasting:
|
From string representation of MAC address and using defaults when broadcasting:
|
||||||
```rust
|
```rust
|
||||||
let wol = wakey::WolPacket::from_string("01:02:03:04:05:06", ':');
|
let wol = wakey::WolPacket::from_string("01:02:03:04:05:06", ':');
|
||||||
match wol.send_magic() {
|
if wol.send_magic().is_ok() {
|
||||||
Ok(_) => println!("Sent the magic packet!"),
|
println!("Sent the magic packet!");
|
||||||
Err(_) => println!("Failed to send the magic packet!")
|
} else {
|
||||||
|
println!("Failed to send the magic packet!");
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
//! # Example
|
//! # Example
|
||||||
//! ```
|
//! ```
|
||||||
//! let wol = wakey::WolPacket::from_string("01:02:03:04:05:06", ':');
|
//! let wol = wakey::WolPacket::from_string("01:02:03:04:05:06", ':');
|
||||||
//! match wol.send_magic() {
|
//! if wol.send_magic().is_ok() {
|
||||||
//! Ok(_) => println!("Sent the magic packet!"),
|
//! println!("Sent the magic packet!");
|
||||||
//! Err(_) => println!("Failed to send the magic packet!")
|
//! } else {
|
||||||
|
//! println!("Failed to send the magic packet!");
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user