]>
git.proxmox.com Git - rustc.git/blob - src/vendor/rayon/src/iter/noop.rs
1 use super::plumbing
::*;
3 pub struct NoopConsumer
;
11 impl<T
> Consumer
<T
> for NoopConsumer
{
12 type Folder
= NoopConsumer
;
13 type Reducer
= NoopReducer
;
16 fn split_at(self, _index
: usize) -> (Self, Self, NoopReducer
) {
17 (NoopConsumer
, NoopConsumer
, NoopReducer
)
20 fn into_folder(self) -> Self {
24 fn full(&self) -> bool
{
29 impl<T
> Folder
<T
> for NoopConsumer
{
32 fn consume(self, _item
: T
) -> Self {
36 fn consume_iter
<I
>(self, iter
: I
) -> Self where I
: IntoIterator
<Item
=T
> {
37 iter
.into_iter().fold((), |_
, _
| ());
43 fn full(&self) -> bool
{
48 impl<T
> UnindexedConsumer
<T
> for NoopConsumer
{
49 fn split_off_left(&self) -> Self {
53 fn to_reducer(&self) -> NoopReducer
{
58 pub struct NoopReducer
;
60 impl Reducer
<()> for NoopReducer
{
61 fn reduce(self, _left
: (), _right
: ()) {}