remove useless

This commit is contained in:
sqlerrorthing
2025-11-01 03:39:48 +08:00
parent 515c946f13
commit 930eaf48d2

View File

@@ -1,19 +0,0 @@
diff --git a/crates/iptables/src/lib.rs b/crates/iptables/src/lib.rs
index 4a4d6dc..e7d15fc 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -92,14 +92,6 @@ pub struct IPTables {
pub is_numeric: bool,
}
-/// Returns `None` because iptables only works on linux
-#[cfg(not(target_os = "linux"))]
-pub fn new(is_ipv6: bool) -> Result<IPTables, Box<dyn Error>> {
- Err(error_from_str("iptables only works on Linux"))
-}
-
-/// Creates a new `IPTables` Result with the command of 'iptables' if `is_ipv6` is `false`, otherwise the command is 'ip6tables'.
-#[cfg(target_os = "linux")]
pub fn new(is_ipv6: bool) -> Result<IPTables, Box<dyn Error>> {
let cmd = if is_ipv6 { "ip6tables" } else { "iptables" };