aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDirk Van Haerenborgh <vhdirk@gmail.com>2018-11-04 19:42:46 +0100
committerDirk Van Haerenborgh <vhdirk@gmail.com>2018-11-04 19:42:46 +0100
commit08aa3be11a25c8ccbdf4806a4a08c9267cae9140 (patch)
tree45a553300dc3cdf77f5e94091a7038139f651610 /tests
parentf2e74aad70b3dceab9c9d78db333f6d71066cbff (diff)
downloadmail-08aa3be11a25c8ccbdf4806a4a08c9267cae9140.tar.gz
start adding 'Ext' threads to enable more flexible supercow api
Diffstat (limited to 'tests')
-rw-r--r--tests/main.rs15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/main.rs b/tests/main.rs
index d790e21..fd7e511 100644
--- a/tests/main.rs
+++ b/tests/main.rs
@@ -1,6 +1,8 @@
extern crate notmuch;
extern crate dirs;
+use std::sync::Arc;
+
use notmuch::StreamingIterator;
fn main() {
@@ -16,10 +18,19 @@ fn main() {
let rev = db.revision();
println!("db revision: {:?}", rev);
}
-
- let query = db.create_query(&"".to_string()).unwrap();
+ let query = {
+ let dbr = Arc::new(db);
+
+ notmuch::Query::create(dbr.clone(), &"".to_string()).unwrap()
+ };
+
+
let mut threads = query.search_threads().unwrap();
+
+
+ //let mut threads = db.create_query(&"".to_string()).unwrap().search_threads().unwrap();
+
while let Some(thread) = threads.next() {
println!("thread {:?} {:?}", thread.subject(), thread.authors());
}