Skip to content

Commit

Permalink
Fix error on non-linux targets
Browse files Browse the repository at this point in the history
  • Loading branch information
yaa110 committed Mar 7, 2021
1 parent eee5902 commit 88130dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "iptables"
version = "0.4.2"
version = "0.4.3"
authors = ["Navid Fathollahzade <[email protected]>", "Pit Kleyersburg <[email protected]>"]
edition = "2018"
description = "Rust bindings for iptables"
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub struct IPTables {
/// 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(IPTError::Other("iptables only works on Linux"))
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'.
Expand Down

0 comments on commit 88130dd

Please sign in to comment.