aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDirk Van Haerenborgh <vhdirk@gmail.com>2018-12-14 18:45:20 +0100
committerDirk Van Haerenborgh <vhdirk@gmail.com>2018-12-14 18:45:20 +0100
commit4b19b951dd2fb7aa7bc662170c91401f2e8fac3b (patch)
tree5b436865f4ae78a90129147e1a0fd8b53b2746b2 /tests
parent022fb6eebf7774b19a1e1b3c6cee7bd7e1b75cd9 (diff)
downloadmail-4b19b951dd2fb7aa7bc662170c91401f2e8fac3b.tar.gz
remove StreamingIterator again as the iterators don't actually have ownership over items
Diffstat (limited to 'tests')
-rw-r--r--tests/main.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/main.rs b/tests/main.rs
index def2e5f..8a857dd 100644
--- a/tests/main.rs
+++ b/tests/main.rs
@@ -3,7 +3,6 @@ use notmuch;
use std::sync::Arc;
-use notmuch::StreamingIteratorExt;
use notmuch::{Query, QueryExt, Threads};
fn main() {
@@ -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());
}