Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
i80and committed Nov 16, 2016
1 parent d78e24b commit 2873f12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ A Rust binding to OpenBSD's pledge(2) interface.
This is equivalent to:

extern crate pledge;
use pledge::{pledge, Promise};
use pledge::{pledge, Promise, ToPromiseString};

fn foo() {
match pledge(&vec![Promise::Stdio, Promise::RPath]) {
match pledge(&vec![Promise::Stdio, Promise::RPath].to_promise_string()) {
Err(_) => println!("Failed to pledge"),
_ => ()
}
}

Alternatively, it is also possible to directly use promises as string slice.
You may also provide promises directly as a string:

use pledge::pledge;

Expand Down

0 comments on commit 2873f12

Please sign in to comment.