diff options
Diffstat (limited to 'src/utils.rs')
-rw-r--r-- | src/utils.rs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/utils.rs b/src/utils.rs deleted file mode 100644 index 53521eae..00000000 --- a/src/utils.rs +++ /dev/null @@ -1,25 +0,0 @@ -use std::ffi::CString; -use std::old_path::{Path}; - -pub trait ToCStr { - fn to_c_str(&self) -> CString; -} - -impl ToCStr for Path { - fn to_c_str(&self) -> CString { - CString::from_slice(self.as_vec()) - } -} - -impl<'a> ToCStr for &'a str { - fn to_c_str(&self) -> CString { - CString::from_slice(self.as_bytes()) - } -} - - -impl ToCStr for String { - fn to_c_str(&self) -> CString { - CString::from_slice(self.as_bytes()) - } -} |