Skip to content

Commit

Permalink
Fix unexported symbol and bump
Browse files Browse the repository at this point in the history
  • Loading branch information
i80and committed Dec 6, 2016
1 parent 1dc9615 commit 31fb43c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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 = "pledge"
version = "0.2.0"
version = "0.2.2"
authors = ["Andrew Aldridge <[email protected]>"]
description = "Rust binding to OpenBSD's pledge(2) interface"
readme = "README.md"
Expand Down
9 changes: 7 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl Promise {
}
}

trait ToPromiseString {
pub trait ToPromiseString {
fn to_promise_string(&self) -> String;
}

Expand Down Expand Up @@ -113,7 +113,12 @@ pub fn pledge(promises: &str) -> Result<(), Error> {
macro_rules! pledge {
( $( $x:ident ),* ) => {
{
use ToPromiseString;
#[cfg(not(test))]
use pledge::{Promise, ToPromiseString};

#[cfg(test)]
use {Promise, ToPromiseString};

let mut promises = Vec::new();
$(
promises.push(Promise::$x);
Expand Down

0 comments on commit 31fb43c

Please sign in to comment.