1010use std:: { fmt:: { self , Debug } , marker:: PhantomData } ;
1111use timely_container:: PushPartitioned ;
1212
13- use crate :: communication:: { Push , Pull , Data } ;
13+ use crate :: communication:: { Push , Pull } ;
1414use crate :: communication:: allocator:: thread:: { ThreadPusher , ThreadPuller } ;
15- use crate :: Container ;
15+ use crate :: { Container , ExchangeData } ;
1616
1717use crate :: worker:: AsWorker ;
1818use crate :: dataflow:: channels:: pushers:: Exchange as ExchangePusher ;
@@ -33,14 +33,14 @@ pub trait ParallelizationContractCore<T, D> {
3333
3434/// A `ParallelizationContractCore` specialized for `Vec` containers
3535/// TODO: Use trait aliases once stable.
36- pub trait ParallelizationContract < T , D : Clone > : ParallelizationContractCore < T , Vec < D > > { }
37- impl < T , D : Clone , P : ParallelizationContractCore < T , Vec < D > > > ParallelizationContract < T , D > for P { }
36+ pub trait ParallelizationContract < T , D > : ParallelizationContractCore < T , Vec < D > > { }
37+ impl < T , D , P : ParallelizationContractCore < T , Vec < D > > > ParallelizationContract < T , D > for P { }
3838
3939/// A direct connection
4040#[ derive( Debug ) ]
4141pub struct Pipeline ;
4242
43- impl < T : ' static , D : Container > ParallelizationContractCore < T , D > for Pipeline {
43+ impl < T : ' static , D : Container + ' static > ParallelizationContractCore < T , D > for Pipeline {
4444 type Pusher = LogPusher < T , D , ThreadPusher < BundleCore < T , D > > > ;
4545 type Puller = LogPuller < T , D , ThreadPuller < BundleCore < T , D > > > ;
4646 fn connect < A : AsWorker > ( self , allocator : & mut A , identifier : usize , address : & [ usize ] , logging : Option < Logger > ) -> ( Self :: Pusher , Self :: Puller ) {
@@ -69,9 +69,9 @@ impl<C, D, F: FnMut(&D)->u64+'static> ExchangeCore<C, D, F> {
6969}
7070
7171// Exchange uses a `Box<Pushable>` because it cannot know what type of pushable will return from the allocator.
72- impl < T : Timestamp , C , D : Data + Clone , F : FnMut ( & D ) ->u64 +' static > ParallelizationContractCore < T , C > for ExchangeCore < C , D , F >
72+ impl < T : Timestamp , C , D : ExchangeData , F : FnMut ( & D ) ->u64 +' static > ParallelizationContractCore < T , C > for ExchangeCore < C , D , F >
7373where
74- C : Data + Container + PushPartitioned < Item =D > ,
74+ C : ExchangeData + Container + PushPartitioned < Item =D > ,
7575{
7676 type Pusher = ExchangePusher < T , C , D , LogPusher < T , C , Box < dyn Push < BundleCore < T , C > > > > , F > ;
7777 type Puller = LogPuller < T , C , Box < dyn Pull < BundleCore < T , C > > > > ;
0 commit comments