aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils.rs b/src/utils.rs
index 7e17ab9..dbabe21 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -25,11 +25,11 @@ impl<T: ffi::AsOsStr> ToCString for T {
}
pub trait ToStr {
- fn to_str(&self) -> Result<&str, str::Utf8Error>;
+ fn to_str<'a>(&self) -> Result<&'a str, str::Utf8Error>;
}
impl ToStr for *const libc::c_char {
- fn to_str(&self) -> Result<&str, str::Utf8Error> {
+ fn to_str<'a>(&self) -> Result<&'a str, str::Utf8Error> {
str::from_utf8(unsafe {
ffi::CStr::from_ptr(*self)
}.to_bytes())