aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/database.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/database.rs b/src/database.rs
index 7364942..3955865 100644
--- a/src/database.rs
+++ b/src/database.rs
@@ -1,4 +1,5 @@
use std::{
+ ops,
path,
ptr,
};
@@ -90,5 +91,12 @@ impl Database {
Ok(())
}
+}
+impl ops::Drop for Database {
+ fn drop(&mut self) {
+ unsafe {
+ ffi::notmuch_database_destroy(self.0)
+ };
+ }
}