From cc92fea48a3c444822c14ccb6cdfd748f065ef27 Mon Sep 17 00:00:00 2001 From: Dirk Van Haerenborgh Date: Mon, 5 Nov 2018 08:41:39 +0100 Subject: implement StreamingIteratorExt for iterator types --- tests/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/main.rs') 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 = ::search_threads(query).unwrap(); + let threads = Arc::new(::search_threads(query).unwrap()); - while let Some(thread) = threads.next() { + while let Some(thread) = as StreamingIteratorExt>>>::next(threads.clone()) { println!("thread {:?} {:?}", thread.subject(), thread.authors()); } -- cgit v1.2.1