aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/utils.rs b/src/utils.rs
index 8aad8f7..fa24029 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -1,6 +1,5 @@
use std::{
ffi,
- path,
str,
};
@@ -10,17 +9,6 @@ pub trait NewFromPtr<T> {
fn new(ptr: T) -> Self;
}
-pub trait ToCString {
- fn to_cstring(&self) -> Result<ffi::CString, ffi::NulError>;
-}
-
-impl<T: AsRef<path::Path>> ToCString for T {
- fn to_cstring(&self) -> Result<ffi::CString, ffi::NulError> {
- let path: &ffi::OsStr = self.as_ref().as_ref();
- path.to_cstring()
- }
-}
-
pub trait ToStr {
fn to_str<'a>(&self) -> Result<&'a str, str::Utf8Error>;
}