Skip to content

Commit d87263b

Browse files
committed
Merge pull request #76 from arielb1/rfc1214-again
Add Sized bounds to meet new WF requirements
2 parents b01e117 + d03a7c4 commit d87263b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/par_iter/internal.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub trait ProducerCallback<ITEM> {
1616
/// A producer which will produce a fixed number of items N. This is
1717
/// not queryable through the API; the consumer is expected to track
1818
/// it.
19-
pub trait Producer: IntoIterator + Send {
19+
pub trait Producer: IntoIterator + Send + Sized {
2020
/// Cost to produce `len` items, where `len` must be `N`.
2121
fn cost(&mut self, len: usize) -> f64;
2222

@@ -26,7 +26,7 @@ pub trait Producer: IntoIterator + Send {
2626
}
2727

2828
/// A consumer which consumes items that are fed to it.
29-
pub trait Consumer<Item>: Send {
29+
pub trait Consumer<Item>: Send + Sized {
3030
type Folder: Folder<Item, Result=Self::Result>;
3131
type Reducer: Reducer<Self::Result>;
3232
type Result: Send;
@@ -130,4 +130,3 @@ pub struct NoopReducer;
130130
impl Reducer<()> for NoopReducer {
131131
fn reduce(self, _left: (), _right: ()) { }
132132
}
133-

0 commit comments

Comments
 (0)