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:
|
||||
```rust
|
||||
let wol = wakey::WolPacket::from_string("01:02:03:04:05:06", ':');
|
||||
match wol.send_magic() {
|
||||
Ok(_) => println!("Sent the magic packet!"),
|
||||
Err(_) => println!("Failed to send the magic packet!")
|
||||
if wol.send_magic().is_ok() {
|
||||
println!("Sent the magic packet!");
|
||||
} else {
|
||||
println!("Failed to send the magic packet!");
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
//! # Example
|
||||
//! ```
|
||||
//! let wol = wakey::WolPacket::from_string("01:02:03:04:05:06", ':');
|
||||
//! match wol.send_magic() {
|
||||
//! Ok(_) => println!("Sent the magic packet!"),
|
||||
//! Err(_) => println!("Failed to send the magic packet!")
|
||||
//! if wol.send_magic().is_ok() {
|
||||
//! println!("Sent the magic packet!");
|
||||
//! } else {
|
||||
//! println!("Failed to send the magic packet!");
|
||||
//! }
|
||||
//! ```
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user