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 ad6cf9b..75a5788 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -35,15 +35,3 @@ impl ToStr for *const libc::c_char {
}.to_bytes())
}
}
-
-pub trait ToStaticStr {
- fn to_static_str(&self) -> Result<&'static str, str::Utf8Error>;
-}
-
-impl ToStaticStr for *const libc::c_char {
- fn to_static_str(&self) -> Result<&'static str, str::Utf8Error> {
- str::from_utf8(unsafe {
- ffi::CStr::from_ptr(*self)
- }.to_bytes())
- }
-}