Skip to content

Commit

Permalink
clarify example in README (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
João Paulo authored Sep 9, 2022
1 parent 01cb3ba commit 550ec42
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ List the network interfaces on the system.

Example usage:
```rust
for ifa in netif::up() {
if !ifa.address().is_loopback() {
println!("{:?}", ifa);
fn main() {
for ifa in netif::up().unwrap() {
if !ifa.address().is_loopback() {
println!("{:?}", ifa);
}
}
}
```
Expand Down

0 comments on commit 550ec42

Please sign in to comment.