aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorC. Morgan Hamill <me@cmhamill.org>2015-03-20 15:43:06 +0100
committerC. Morgan Hamill <me@cmhamill.org>2015-03-20 15:48:41 +0100
commit8a9a4314f0a39b3e2ea626e7fdbbbbf20ba8e0e8 (patch)
treee7613f3041bef8ddac09be5285172ac3f2b133d2 /src/lib.rs
parentb94a736f5d4ba73182e1c6b2b1f49a1a718a5216 (diff)
downloadmail-8a9a4314f0a39b3e2ea626e7fdbbbbf20ba8e0e8.tar.gz
Add `ToCString` trait.
Allows easy conversion of any `T: AsOsStr` to a `CString`, whose `as_ptr()` method is quite convenient for FFI calls. Note that `std::path::Path` implements `AsOsStr`, which means we can easily take paths and get a pointer to `*const libc::c_char`.
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index f7358b7..379be2f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,4 +1,4 @@
-#![feature(core, libc)]
+#![feature(core, libc, std_misc)]
extern crate libc;
#[macro_use]