diff options
| author | Dirk Van Haerenborgh <vhdirk@gmail.com> | 2018-04-19 10:21:14 +0200 |
|---|---|---|
| committer | Dirk Van Haerenborgh <vhdirk@gmail.com> | 2018-10-06 10:05:07 +0200 |
| commit | f021813ed443b4ef7224d1934881abecf53977a7 (patch) | |
| tree | c82d534ec74a2fb2025f5815302e6005de78f566 /src/thread.rs | |
| parent | 1be0cc6ab7920208b3d6986dbb6076846d758c17 (diff) | |
| download | mail-f021813ed443b4ef7224d1934881abecf53977a7.tar.gz | |
cleanup & export db revision uuid
Diffstat (limited to 'src/thread.rs')
| -rw-r--r-- | src/thread.rs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/thread.rs b/src/thread.rs index 47166d4..dfe0a69 100644 --- a/src/thread.rs +++ b/src/thread.rs @@ -1,8 +1,5 @@ -use std::{ - ops, - marker -}; - +use std::ops::Drop; +use std::marker::PhantomData; use ffi; use utils::{ NewFromPtr, @@ -15,12 +12,12 @@ use Tags; #[derive(Debug)] pub struct Thread<'q, 'd:'q>( pub(crate) *mut ffi::notmuch_thread_t, - marker::PhantomData<&'q Query<'d>>, + PhantomData<&'q Query<'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) + Thread(ptr, PhantomData) } } @@ -39,7 +36,8 @@ impl<'q, 'd> Thread<'q, 'd>{ ffi::notmuch_thread_get_total_messages(self.0) } } -#[cfg(feature = "0.26")] + + #[cfg(feature = "0.26")] pub fn total_files(self: &Self) -> i32{ unsafe { ffi::notmuch_thread_get_total_files(self.0) @@ -100,7 +98,7 @@ impl<'q, 'd> Thread<'q, 'd>{ } -impl<'q, 'd> ops::Drop for Thread<'q, 'd> { +impl<'q, 'd> Drop for Thread<'q, 'd> { fn drop(&mut self) { unsafe { ffi::notmuch_thread_destroy(self.0) |
