aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDirk Van Haerenborgh <vhdirk@gmail.com>2018-11-05 08:41:39 +0100
committerDirk Van Haerenborgh <vhdirk@gmail.com>2018-11-05 08:41:39 +0100
commitcc92fea48a3c444822c14ccb6cdfd748f065ef27 (patch)
treeec0ab81b707e312a31da90b49c1b72e47d160be4 /tests
parent942740b143c8f07f402da8e20338c8f769fe5447 (diff)
downloadmail-cc92fea48a3c444822c14ccb6cdfd748f065ef27.tar.gz
implement StreamingIteratorExt for iterator types
Diffstat (limited to 'tests')
-rw-r--r--tests/main.rs8
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());
}