aboutsummaryrefslogtreecommitdiffstats
path: root/src/thread.rs
diff options
context:
space:
mode:
authorDirk Van Haerenborgh <vhdirk@gmail.com>2018-03-23 07:16:39 +0100
committerDirk Van Haerenborgh <vhdirk@gmail.com>2018-03-23 07:16:39 +0100
commitbe546fe6e4b709d1bb8770fdf0763ce4f494d0d6 (patch)
treee08fb65667bdd1bd711c24f047a230b78f923936 /src/thread.rs
parent8e76db5f75c9c315236bc6f8c6e195cec6103537 (diff)
downloadmail-be546fe6e4b709d1bb8770fdf0763ce4f494d0d6.tar.gz
improve lifetime definitions
Diffstat (limited to 'src/thread.rs')
-rw-r--r--src/thread.rs19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/thread.rs b/src/thread.rs
index 980ff39..cf5440c 100644
--- a/src/thread.rs
+++ b/src/thread.rs
@@ -11,21 +11,28 @@ use ffi;
use utils::{
NewFromPtr,
};
-use Database;
+use Query;
#[derive(Debug)]
-pub struct Thread<'d>(
+pub struct Thread<'q, 'd:'q>(
pub(crate) *mut ffi::notmuch_thread_t,
- marker::PhantomData<&'d mut Database>,
+ marker::PhantomData<&'q mut Query<'d>>,
);
-impl<'d> NewFromPtr<*mut ffi::notmuch_thread_t> for Thread<'d> {
- fn new(ptr: *mut ffi::notmuch_thread_t) -> Thread<'d> {
+impl<'q, 'd> NewFromPtr<*mut ffi::notmuch_thread_t> for Thread<'q, 'd> {
+ fn new(ptr: *mut ffi::notmuch_thread_t) -> Thread<'q, 'd> {
Thread(ptr, marker::PhantomData)
}
}
-impl<'d> ops::Drop for Thread<'d> {
+// impl<'d> Thread<'d>(
+//
+//
+//
+// };
+//
+
+impl<'q, 'd> ops::Drop for Thread<'q, 'd> {
fn drop(&mut self) {
unsafe {
ffi::notmuch_thread_destroy(self.0)