summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 3442f58..7022d37 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -42,6 +42,7 @@ use std::{collections::HashMap, num::NonZeroUsize};
use crossbeam_channel::{Receiver, Select, Sender, TryRecvError};
/// An extension trait adding parallel sequential mapping to the standard [`Iterator`] trait.
+#[must_use = "iterators are lazy and do nothing unless consumed"]
pub trait ParallelIterator {
/// Creates an iterator which applies a given closure to each element in parallel.
///
@@ -146,6 +147,7 @@ impl<I> ParallelIterator for I where I: Iterator {}
///
/// This struct is created by the [`map_parallel`](ParallelIterator::map_parallel) method on the
/// [`ParallelIterator`] trait.
+#[must_use = "iterators are lazy and do nothing unless consumed"]
pub struct ParallelMap<I, B>
where
I: Iterator,
Generated by cgit. See skreutz.com for my tech blog and contact information.