From c6a87e2dad3bd0ded0115273a88dcb53936237d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20F=C3=A4rnstrand?= Date: Wed, 17 Jul 2024 08:52:07 +0200 Subject: [PATCH] Fix example also --- examples/enable.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/enable.rs b/examples/enable.rs index dfeac9a..b1bfe9a 100644 --- a/examples/enable.rs +++ b/examples/enable.rs @@ -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"), } }