aboutsummaryrefslogtreecommitdiffstats
path: root/tests/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/main.rs')
-rw-r--r--tests/main.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/main.rs b/tests/main.rs
index def2e5f..9ad0a36 100644
--- a/tests/main.rs
+++ b/tests/main.rs
@@ -1,10 +1,9 @@
-use dirs;
-use notmuch;
+extern crate dirs;
+extern crate notmuch;
use std::sync::Arc;
-use notmuch::StreamingIteratorExt;
-use notmuch::{Query, QueryExt, Threads};
+use notmuch::{Query, QueryExt};
fn main() {
let mut mail_path = dirs::home_dir().unwrap();
@@ -30,9 +29,9 @@ fn main() {
// let mut threads = db.create_query(&"".to_string()).unwrap().search_threads().unwrap();
- let threads = Arc::new(<Query as QueryExt>::search_threads(query).unwrap());
+ let mut threads = Arc::new(<Query as QueryExt>::search_threads(query).unwrap());
- while let Some(thread) = <Threads<_> as StreamingIteratorExt<_>>::next(threads.clone())
+ for thread in Arc::get_mut(&mut threads).unwrap()
{
println!("thread {:?} {:?}", thread.subject(), thread.authors());
}