diff --git a/src/collections/binary_heap.rs b/src/collections/binary_heap.rs index f69338968..99404c99d 100644 --- a/src/collections/binary_heap.rs +++ b/src/collections/binary_heap.rs @@ -5,7 +5,7 @@ use std::collections::BinaryHeap; use iter::*; -use iter::internal::*; +use iter::plumbing::*; use vec; diff --git a/src/collections/btree_map.rs b/src/collections/btree_map.rs index a6b17b11b..f9a13b52e 100644 --- a/src/collections/btree_map.rs +++ b/src/collections/btree_map.rs @@ -5,7 +5,7 @@ use std::collections::BTreeMap; use iter::*; -use iter::internal::*; +use iter::plumbing::*; use vec; diff --git a/src/collections/btree_set.rs b/src/collections/btree_set.rs index a5b80e653..77d3ec8b5 100644 --- a/src/collections/btree_set.rs +++ b/src/collections/btree_set.rs @@ -5,7 +5,7 @@ use std::collections::BTreeSet; use iter::*; -use iter::internal::*; +use iter::plumbing::*; use vec; diff --git a/src/collections/hash_map.rs b/src/collections/hash_map.rs index 75c5007cb..346bfae70 100644 --- a/src/collections/hash_map.rs +++ b/src/collections/hash_map.rs @@ -6,7 +6,7 @@ use std::collections::HashMap; use std::hash::{Hash, BuildHasher}; use iter::*; -use iter::internal::*; +use iter::plumbing::*; use vec; diff --git a/src/collections/hash_set.rs b/src/collections/hash_set.rs index 57145c433..c20105185 100644 --- a/src/collections/hash_set.rs +++ b/src/collections/hash_set.rs @@ -6,7 +6,7 @@ use std::collections::HashSet; use std::hash::{Hash, BuildHasher}; use iter::*; -use iter::internal::*; +use iter::plumbing::*; use vec; diff --git a/src/collections/linked_list.rs b/src/collections/linked_list.rs index 04e3df1e8..ca7490406 100644 --- a/src/collections/linked_list.rs +++ b/src/collections/linked_list.rs @@ -5,7 +5,7 @@ use std::collections::LinkedList; use iter::*; -use iter::internal::*; +use iter::plumbing::*; use vec; diff --git a/src/collections/vec_deque.rs b/src/collections/vec_deque.rs index af1c26a1c..d880afe46 100644 --- a/src/collections/vec_deque.rs +++ b/src/collections/vec_deque.rs @@ -5,7 +5,7 @@ use std::collections::VecDeque; use iter::*; -use iter::internal::*; +use iter::plumbing::*; use slice; use vec; diff --git a/src/iter/chain.rs b/src/iter/chain.rs index a0eb47b51..fc90a994f 100644 --- a/src/iter/chain.rs +++ b/src/iter/chain.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; use std::cmp; use std::iter; diff --git a/src/iter/cloned.rs b/src/iter/cloned.rs index 065c5ea0f..0681d8524 100644 --- a/src/iter/cloned.rs +++ b/src/iter/cloned.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; use std::iter; diff --git a/src/iter/collect/consumer.rs b/src/iter/collect/consumer.rs index 8f1b80ef3..ff4e70ef9 100644 --- a/src/iter/collect/consumer.rs +++ b/src/iter/collect/consumer.rs @@ -1,4 +1,4 @@ -use super::super::internal::*; +use super::super::plumbing::*; use super::super::noop::*; use std::ptr; use std::slice; diff --git a/src/iter/collect/test.rs b/src/iter/collect/test.rs index 2348d7746..97138bc3c 100644 --- a/src/iter/collect/test.rs +++ b/src/iter/collect/test.rs @@ -5,7 +5,7 @@ // try to drive the "collect consumer" incorrectly. These should // result in panics. -use iter::internal::*; +use iter::plumbing::*; use super::Collect; /// Promises to produce 2 items, but then produces 3. Does not do any diff --git a/src/iter/empty.rs b/src/iter/empty.rs index f4ca74482..9d304b675 100644 --- a/src/iter/empty.rs +++ b/src/iter/empty.rs @@ -1,4 +1,4 @@ -use iter::internal::*; +use iter::plumbing::*; use iter::*; use std; diff --git a/src/iter/enumerate.rs b/src/iter/enumerate.rs index b89d40f60..0eb98d269 100644 --- a/src/iter/enumerate.rs +++ b/src/iter/enumerate.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; use std::iter; use std::ops::Range; diff --git a/src/iter/filter.rs b/src/iter/filter.rs index 89dbceb8b..3a166c972 100644 --- a/src/iter/filter.rs +++ b/src/iter/filter.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; use std::fmt::{self, Debug}; diff --git a/src/iter/filter_map.rs b/src/iter/filter_map.rs index 1858dc7bb..33a86758c 100644 --- a/src/iter/filter_map.rs +++ b/src/iter/filter_map.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; use std::fmt::{self, Debug}; diff --git a/src/iter/find.rs b/src/iter/find.rs index 82dc1a8b2..d271e62e0 100644 --- a/src/iter/find.rs +++ b/src/iter/find.rs @@ -1,5 +1,5 @@ use std::sync::atomic::{AtomicBool, Ordering}; -use super::internal::*; +use super::plumbing::*; use super::*; pub fn find(pi: I, find_op: P) -> Option diff --git a/src/iter/find_first_last/mod.rs b/src/iter/find_first_last/mod.rs index 18fa48b14..758a3347e 100644 --- a/src/iter/find_first_last/mod.rs +++ b/src/iter/find_first_last/mod.rs @@ -1,6 +1,6 @@ use std::cell::Cell; use std::sync::atomic::{AtomicUsize, Ordering}; -use super::internal::*; +use super::plumbing::*; use super::*; #[cfg(test)] diff --git a/src/iter/flat_map.rs b/src/iter/flat_map.rs index 7fcf31c44..6cb6d6e7b 100644 --- a/src/iter/flat_map.rs +++ b/src/iter/flat_map.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; use std::fmt::{self, Debug}; diff --git a/src/iter/flatten.rs b/src/iter/flatten.rs index 48b75df38..521c161a1 100644 --- a/src/iter/flatten.rs +++ b/src/iter/flatten.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; /// `Flatten` turns each element to an iterator, then flattens these iterators diff --git a/src/iter/fold.rs b/src/iter/fold.rs index 5da062ef8..1e5d84a02 100644 --- a/src/iter/fold.rs +++ b/src/iter/fold.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; use std::fmt::{self, Debug}; diff --git a/src/iter/for_each.rs b/src/iter/for_each.rs index 16f5df961..c80a05b81 100644 --- a/src/iter/for_each.rs +++ b/src/iter/for_each.rs @@ -1,5 +1,5 @@ use super::ParallelIterator; -use super::internal::*; +use super::plumbing::*; use super::noop::*; pub fn for_each(pi: I, op: &F) diff --git a/src/iter/inspect.rs b/src/iter/inspect.rs index 7c925c17a..fdf514804 100644 --- a/src/iter/inspect.rs +++ b/src/iter/inspect.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; use std::fmt::{self, Debug}; diff --git a/src/iter/interleave.rs b/src/iter/interleave.rs index 9dfb95f9e..6861f5f09 100644 --- a/src/iter/interleave.rs +++ b/src/iter/interleave.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; use std::cmp; use std::iter::Fuse; diff --git a/src/iter/interleave_shortest.rs b/src/iter/interleave_shortest.rs index 4a5e57d24..686e22766 100644 --- a/src/iter/interleave_shortest.rs +++ b/src/iter/interleave_shortest.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; /// `InterleaveShortest` is an iterator that works similarly to diff --git a/src/iter/intersperse.rs b/src/iter/intersperse.rs index b39c4f054..351a86e7d 100644 --- a/src/iter/intersperse.rs +++ b/src/iter/intersperse.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; use std::cell::Cell; use std::iter::Fuse; diff --git a/src/iter/len.rs b/src/iter/len.rs index 2e939b5cc..34bafcf6d 100644 --- a/src/iter/len.rs +++ b/src/iter/len.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; use std::cmp; diff --git a/src/iter/map.rs b/src/iter/map.rs index 9182c07be..0f0f7cf3f 100644 --- a/src/iter/map.rs +++ b/src/iter/map.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; use std::fmt::{self, Debug}; diff --git a/src/iter/map_with.rs b/src/iter/map_with.rs index 1e211fb00..8df19ad0b 100644 --- a/src/iter/map_with.rs +++ b/src/iter/map_with.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; use std::fmt::{self, Debug}; diff --git a/src/iter/mod.rs b/src/iter/mod.rs index ddd4aa45c..a465e30e6 100644 --- a/src/iter/mod.rs +++ b/src/iter/mod.rs @@ -6,14 +6,14 @@ //! //! The submodules of this module mostly just contain implementaton //! details of little interest to an end-user. If you'd like to read -//! the code itself, the `internal` module and `README.md` file are a +//! the code itself, the `plumbing` module and `README.md` file are a //! good place to start. pub use either::Either; use std::cmp::{self, Ordering}; use std::iter::{Sum, Product}; use std::ops::Fn; -use self::internal::*; +use self::plumbing::*; // There is a method to the madness here: // @@ -42,7 +42,7 @@ pub use self::flat_map::FlatMap; mod flatten; pub use self::flatten::Flatten; mod from_par_iter; -pub mod internal; +pub mod plumbing; mod for_each; mod fold; pub use self::fold::{Fold, FoldWith}; diff --git a/src/iter/noop.rs b/src/iter/noop.rs index 0ffafec72..69cc7a034 100644 --- a/src/iter/noop.rs +++ b/src/iter/noop.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; pub struct NoopConsumer; diff --git a/src/iter/once.rs b/src/iter/once.rs index 87160cc33..c882269be 100644 --- a/src/iter/once.rs +++ b/src/iter/once.rs @@ -1,4 +1,4 @@ -use iter::internal::*; +use iter::plumbing::*; use iter::*; /// Creates a parallel iterator that produces an element exactly once. diff --git a/src/iter/internal.rs b/src/iter/plumbing.rs similarity index 97% rename from src/iter/internal.rs rename to src/iter/plumbing.rs index b7b260f1e..07da2fb85 100644 --- a/src/iter/internal.rs +++ b/src/iter/plumbing.rs @@ -1,7 +1,6 @@ -//! Internal traits and functions used to implement parallel -//! iteration. These should be considered highly unstable: users of -//! parallel iterators should not need to interact with them directly. -//! See `README.md` for a high-level overview. +//! Traits and functions used to implement parallel iteration. These are +//! low-level details -- users of parallel iterators should not need to +//! interact with them directly. See `README.md` for a high-level overview. use join_context; diff --git a/src/iter/product.rs b/src/iter/product.rs index 013ca3552..7cc916d80 100644 --- a/src/iter/product.rs +++ b/src/iter/product.rs @@ -1,5 +1,5 @@ use super::ParallelIterator; -use super::internal::*; +use super::plumbing::*; use std::iter::{self, Product}; use std::marker::PhantomData; diff --git a/src/iter/reduce.rs b/src/iter/reduce.rs index e505935da..fef5f4ce8 100644 --- a/src/iter/reduce.rs +++ b/src/iter/reduce.rs @@ -1,5 +1,5 @@ use super::ParallelIterator; -use super::internal::*; +use super::plumbing::*; pub fn reduce(pi: PI, identity: ID, reduce_op: R) -> T where PI: ParallelIterator, diff --git a/src/iter/repeat.rs b/src/iter/repeat.rs index 9e705aea9..5cb900141 100644 --- a/src/iter/repeat.rs +++ b/src/iter/repeat.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; use std::iter; use std::usize; diff --git a/src/iter/rev.rs b/src/iter/rev.rs index 63f3d9ad1..a1f9ec25f 100644 --- a/src/iter/rev.rs +++ b/src/iter/rev.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; use std::iter; diff --git a/src/iter/skip.rs b/src/iter/skip.rs index 940256ba0..f28cf3185 100644 --- a/src/iter/skip.rs +++ b/src/iter/skip.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; use super::noop::NoopConsumer; use std::cmp::min; diff --git a/src/iter/splitter.rs b/src/iter/splitter.rs index 6149bffa2..5e3e06c5a 100644 --- a/src/iter/splitter.rs +++ b/src/iter/splitter.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; use std::fmt::{self, Debug}; diff --git a/src/iter/sum.rs b/src/iter/sum.rs index 37d5e8b5d..58a044879 100644 --- a/src/iter/sum.rs +++ b/src/iter/sum.rs @@ -1,5 +1,5 @@ use super::ParallelIterator; -use super::internal::*; +use super::plumbing::*; use std::iter::{self, Sum}; use std::marker::PhantomData; diff --git a/src/iter/take.rs b/src/iter/take.rs index a8d25dfde..1acef15b3 100644 --- a/src/iter/take.rs +++ b/src/iter/take.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; use std::cmp::min; diff --git a/src/iter/unzip.rs b/src/iter/unzip.rs index 37f2224bd..f1a8fbef3 100644 --- a/src/iter/unzip.rs +++ b/src/iter/unzip.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; /// This trait abstracts the different ways we can "unzip" one parallel diff --git a/src/iter/while_some.rs b/src/iter/while_some.rs index 2ebdeb63e..52d85763a 100644 --- a/src/iter/while_some.rs +++ b/src/iter/while_some.rs @@ -1,5 +1,5 @@ use std::sync::atomic::{AtomicBool, Ordering}; -use super::internal::*; +use super::plumbing::*; use super::*; /// `WhileSome` is an iterator that yields the `Some` elements of an iterator, diff --git a/src/iter/zip.rs b/src/iter/zip.rs index a6f5bb843..98ac632a4 100644 --- a/src/iter/zip.rs +++ b/src/iter/zip.rs @@ -1,4 +1,4 @@ -use super::internal::*; +use super::plumbing::*; use super::*; use std::cmp; use std::iter; diff --git a/src/iter/zip_eq.rs b/src/iter/zip_eq.rs index c7e2c631d..09d051b33 100644 --- a/src/iter/zip_eq.rs +++ b/src/iter/zip_eq.rs @@ -1,5 +1,5 @@ -use super::internal::*; +use super::plumbing::*; use super::*; /// An [`IndexedParallelIterator`] that iterates over two parallel iterators of equal diff --git a/src/option.rs b/src/option.rs index 33f2879f4..5d3a368e6 100644 --- a/src/option.rs +++ b/src/option.rs @@ -3,7 +3,7 @@ //! unless you have need to name one of the iterator types. use iter::*; -use iter::internal::*; +use iter::plumbing::*; use std; use std::sync::atomic::{AtomicBool, Ordering}; diff --git a/src/par_either.rs b/src/par_either.rs index ec5a184e4..ec83f77c1 100644 --- a/src/par_either.rs +++ b/src/par_either.rs @@ -1,5 +1,5 @@ use iter::*; -use iter::internal::*; +use iter::plumbing::*; use iter::Either::{Left, Right}; /// `Either` is a parallel iterator if both `L` and `R` are parallel iterators. diff --git a/src/range.rs b/src/range.rs index 9f0ffcfc7..d0ddae963 100644 --- a/src/range.rs +++ b/src/range.rs @@ -14,7 +14,7 @@ //! ``` use iter::*; -use iter::internal::*; +use iter::plumbing::*; use std::ops::Range; /// Parallel iterator over a range, implemented for all integer types. diff --git a/src/result.rs b/src/result.rs index 6dfdb7566..f68bd95c9 100644 --- a/src/result.rs +++ b/src/result.rs @@ -3,7 +3,7 @@ //! unless you have need to name one of the iterator types. use iter::*; -use iter::internal::*; +use iter::plumbing::*; use std::sync::Mutex; use option; diff --git a/src/slice/mod.rs b/src/slice/mod.rs index c37f6109b..320f51e1b 100644 --- a/src/slice/mod.rs +++ b/src/slice/mod.rs @@ -8,7 +8,7 @@ mod quicksort; mod test; use iter::*; -use iter::internal::*; +use iter::plumbing::*; use self::mergesort::par_mergesort; use self::quicksort::par_quicksort; use split_producer::*; diff --git a/src/split_producer.rs b/src/split_producer.rs index 7d662ffcd..e057b9a0f 100644 --- a/src/split_producer.rs +++ b/src/split_producer.rs @@ -2,7 +2,7 @@ //! //! This module is private, so these items are effectively `pub(super)` -use iter::internal::{UnindexedProducer, Folder}; +use iter::plumbing::{UnindexedProducer, Folder}; /// Common producer for splitting on a predicate. pub struct SplitProducer<'p, P: 'p, V> { diff --git a/src/str.rs b/src/str.rs index 36adf1f23..92b6a7192 100644 --- a/src/str.rs +++ b/src/str.rs @@ -13,7 +13,7 @@ //! [`par_split_terminator()`]: trait.ParallelString.html#method.par_split_terminator use iter::*; -use iter::internal::*; +use iter::plumbing::*; use split_producer::*; @@ -107,7 +107,7 @@ impl ParallelString for str { /// would be nicer to have its basic existence and implementors public while /// keeping all of the methods private. mod private { - use iter::internal::Folder; + use iter::plumbing::Folder; /// Pattern-matching trait for `ParallelString`, somewhat like a mix of /// `std::str::pattern::{Pattern, Searcher}`. diff --git a/src/vec.rs b/src/vec.rs index 57c369b05..cca6c966d 100644 --- a/src/vec.rs +++ b/src/vec.rs @@ -3,7 +3,7 @@ //! unless you have need to name one of those types. use iter::*; -use iter::internal::*; +use iter::plumbing::*; use std; /// Parallel iterator that moves out of a vector. diff --git a/tests/producer_split_at.rs b/tests/producer_split_at.rs index 29d2c913a..832fe0249 100644 --- a/tests/producer_split_at.rs +++ b/tests/producer_split_at.rs @@ -3,7 +3,7 @@ extern crate rayon; use rayon::prelude::*; -use rayon::iter::internal::*; +use rayon::iter::plumbing::*; /// Stress-test indexes for `Producer::split_at`. fn check(expected: &[I::Item], mut f: F)