mirror of
https://github.com/egor-white/zaprett.git
synced 2025-12-10 13:30:23 +05:00
remove useless
This commit is contained in:
@@ -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" };
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user