aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ffi.rs2
-rw-r--r--src/utils.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/ffi.rs b/src/ffi.rs
index 45a1f17..5f71778 100644
--- a/src/ffi.rs
+++ b/src/ffi.rs
@@ -67,7 +67,7 @@ impl notmuch_status_t {
}
impl ToStr for NotmuchStatus {
- fn to_str(&self) -> Result<&str, str::Utf8Error> {
+ fn to_str<'a>(&self) -> Result<&'a str, str::Utf8Error> {
unsafe {
notmuch_status_to_string(self.to_notmuch_t())
}.to_static_str()
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())