Skip to content

Commit

Permalink
Fix example also
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed Jul 17, 2024
1 parent 57fb0eb commit c6a87e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/enable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn main() {
// Try to enable the firewall. Equivalent to the CLI command "pfctl -e".
match pf.enable() {
Ok(_) => println!("Enabled PF"),
Err(pfctl::Error(pfctl::ErrorKind::StateAlreadyActive, _)) => (),
Err(e) if e.kind() == pfctl::ErrorKind::StateAlreadyActive => (),
err => err.expect("Unable to enable PF"),
}
}

0 comments on commit c6a87e2

Please sign in to comment.