diff options
Diffstat (limited to 'src/query.rs')
| -rw-r--r-- | src/query.rs | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/query.rs b/src/query.rs index 125e63d..e0c748e 100644 --- a/src/query.rs +++ b/src/query.rs @@ -1,15 +1,12 @@ -use std::{ - ops, - marker, - ptr, -}; +use std::ops::Drop; +use std::ptr; +use std::marker::PhantomData; use error::Result; use ffi; -use utils::{ - NewFromPtr, -}; +use utils::NewFromPtr; + use Database; use Messages; use Threads; @@ -18,7 +15,7 @@ use ffi::Sort; #[derive(Debug)] pub struct Query<'d>( pub(crate) *mut ffi::notmuch_query_t, - marker::PhantomData<&'d Database>, + PhantomData<&'d Database>, ); @@ -101,12 +98,12 @@ impl<'d> Query<'d> { impl<'d> NewFromPtr<*mut ffi::notmuch_query_t> for Query<'d> { fn new(ptr: *mut ffi::notmuch_query_t) -> Query<'d> { - Query(ptr, marker::PhantomData) + Query(ptr, PhantomData) } } -impl<'d> ops::Drop for Query<'d> { +impl<'d> Drop for Query<'d> { fn drop(&mut self) { unsafe { ffi::notmuch_query_destroy(self.0) |
