aboutsummaryrefslogtreecommitdiffstats
path: root/src/query.rs
diff options
context:
space:
mode:
authorDirk Van Haerenborgh <vhdirk@gmail.com>2018-04-13 18:51:55 +0200
committerDirk Van Haerenborgh <vhdirk@gmail.com>2018-04-13 18:51:55 +0200
commit3f02ab97bea870111aa23c32291de129b824de89 (patch)
tree598fb2aab59a34976278b06725b9384040edf15b /src/query.rs
parent52050a5e1dcd613915135e217439bc6293bea257 (diff)
downloadmail-3f02ab97bea870111aa23c32291de129b824de89.tar.gz
add missing lifetime parameters
Diffstat (limited to 'src/query.rs')
-rw-r--r--src/query.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/query.rs b/src/query.rs
index aa5d9f5..660c86c 100644
--- a/src/query.rs
+++ b/src/query.rs
@@ -19,7 +19,7 @@ use ffi::Sort;
#[derive(Debug)]
pub struct Query<'d>(
pub(crate) *mut ffi::notmuch_query_t,
- marker::PhantomData<&'d mut Database>,
+ marker::PhantomData<&'d Database>,
);
@@ -51,7 +51,7 @@ impl<'d> Query<'d> {
/// Filter messages according to the query and return
- pub fn search_messages<'q>(self: &Self) -> Result<Messages<'q, 'd>>
+ pub fn search_messages<'q>(self: &'d Self) -> Result<Messages<'q, 'd>>
{
let mut msgs = ptr::null_mut();
try!(unsafe {
@@ -75,7 +75,7 @@ impl<'d> Query<'d> {
return Ok(cnt);
}
- pub fn search_threads<'q>(self: &Self) -> Result<Threads<'q, 'd>>
+ pub fn search_threads<'q>(self: &'d Self) -> Result<Threads<'q, 'd>>
{
let mut thrds = ptr::null_mut();
try!(unsafe {
@@ -115,4 +115,5 @@ impl<'d> ops::Drop for Query<'d> {
}
}
-unsafe impl<'d> Send for Query<'d>{}
+unsafe impl<'d> Send for Query<'d> {}
+// unsafe impl<'d> Sync for Query<'d> {}