@@ -19,7 +19,7 @@ use dataflow::channels::{Message, Content};
19
19
20
20
use abomonation:: Abomonation ;
21
21
22
- /// A ParallelizationContract allocates paired `Push` and `Pull` implementors.
22
+ /// A ` ParallelizationContract` allocates paired `Push` and `Pull` implementors.
23
23
pub trait ParallelizationContract < T : ' static , D : ' static > {
24
24
/// Type implementing `Push` produced by this pact.
25
25
type Pusher : Push < ( T , Content < D > ) > +' static ;
@@ -36,7 +36,7 @@ impl<T: 'static, D: 'static> ParallelizationContract<T, D> for Pipeline {
36
36
type Pusher = Pusher < T , D , ThreadPusher < Message < T , D > > > ;
37
37
type Puller = Puller < T , D , ThreadPuller < Message < T , D > > > ;
38
38
fn connect < A : Allocate > ( self , allocator : & mut A , identifier : usize ) -> ( Self :: Pusher , Self :: Puller ) {
39
- // ignore &mut A and use thread allocator
39
+ // ignore ` &mut A` and use thread allocator
40
40
let ( pusher, puller) = Thread :: new :: < Message < T , D > > ( ) ;
41
41
42
42
( Pusher :: new ( pusher, allocator. index ( ) , allocator. index ( ) , identifier) ,
@@ -56,9 +56,7 @@ impl<D, F: Fn(&D)->u64> Exchange<D, F> {
56
56
}
57
57
}
58
58
59
- // Exchange uses a Box<Pushable> because it cannot know what type of pushable will return from the allocator.
60
- // The PactObserver will do some buffering for Exchange, cutting down on the virtual calls, but we still
61
- // would like to get the vectors it sends back, so that they can be re-used if possible.
59
+ // Exchange uses a `Box<Pushable>` because it cannot know what type of pushable will return from the allocator.
62
60
impl < T : Eq +Data +Abomonation , D : Data +Abomonation , F : Fn ( & D ) ->u64 +' static > ParallelizationContract < T , D > for Exchange < D , F > {
63
61
// TODO: The closure in the type prevents us from naming it.
64
62
// Could specialize `ExchangePusher` to a time-free version.
@@ -170,7 +168,7 @@ impl<T, D, P: Pull<Message<T, D>>> Pull<(T, Content<D>)> for Puller<T, D, P> {
170
168
171
169
:: std:: mem:: swap ( & mut previous, self . puller . pull ( ) ) ;
172
170
173
- if let Some ( ref message) = previous. as_ref ( ) {
171
+ if let Some ( message) = previous. as_ref ( ) {
174
172
175
173
:: logging:: log ( & :: logging:: MESSAGES , :: logging:: MessagesEvent {
176
174
is_send : false ,
0 commit comments