aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/query.rs20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/query.rs b/src/query.rs
index 364c001..24a2a1b 100644
--- a/src/query.rs
+++ b/src/query.rs
@@ -1,19 +1,8 @@
use std::{
ops,
- path,
- ptr,
};
-use std::ffi::CString;
-use std::os::raw::c_char;
-
-use libc;
-
use error::Result;
-use utils::{
- NewFromPtr,
- ToStr,
-};
use ffi;
@@ -27,3 +16,12 @@ impl Query {
db.create_query(query_string)
}
}
+
+
+impl ops::Drop for Query {
+ fn drop(&mut self) {
+ unsafe {
+ ffi::notmuch_query_destroy(self.0)
+ };
+ }
+}