diff options
| author | C. Morgan Hamill <me@cmhamill.org> | 2015-03-20 15:43:06 +0100 |
|---|---|---|
| committer | C. Morgan Hamill <me@cmhamill.org> | 2015-03-20 15:48:41 +0100 |
| commit | 8a9a4314f0a39b3e2ea626e7fdbbbbf20ba8e0e8 (patch) | |
| tree | e7613f3041bef8ddac09be5285172ac3f2b133d2 /src/lib.rs | |
| parent | b94a736f5d4ba73182e1c6b2b1f49a1a718a5216 (diff) | |
| download | mail-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.rs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1,4 +1,4 @@ -#![feature(core, libc)] +#![feature(core, libc, std_misc)] extern crate libc; #[macro_use] |
