diff options
Diffstat (limited to 'tests/main.rs')
| -rw-r--r-- | tests/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/main.rs b/tests/main.rs index 11723b2..512aa84 100644 --- a/tests/main.rs +++ b/tests/main.rs @@ -3,8 +3,8 @@ extern crate dirs; use std::sync::Arc; -use notmuch::StreamingIterator; -use notmuch::{Query, QueryExt}; +use notmuch::{StreamingIterator, StreamingIteratorExt}; +use notmuch::{Threads, Thread, Query, QueryExt}; fn main() { @@ -32,10 +32,10 @@ fn main() { // let mut threads = db.create_query(&"".to_string()).unwrap().search_threads().unwrap(); - let mut threads = <Query as QueryExt>::search_threads(query).unwrap(); + let threads = Arc::new(<Query as QueryExt>::search_threads(query).unwrap()); - while let Some(thread) = threads.next() { + while let Some(thread) = <Threads<Query> as StreamingIteratorExt<Thread<Threads<Query>>>>::next(threads.clone()) { println!("thread {:?} {:?}", thread.subject(), thread.authors()); } |
