@@ -23,16 +23,16 @@ use std::rt::rtio::{PausableIdleCallback, Callback};
23
23
use std:: rt:: exclusive:: Exclusive ;
24
24
25
25
/// This is the only exported function from this module.
26
- pub fn event_loop ( ) -> Box < EventLoop : Send > {
27
- box BasicLoop :: new ( ) as Box < EventLoop : Send >
26
+ pub fn event_loop ( ) -> Box < EventLoop + Send > {
27
+ box BasicLoop :: new ( ) as Box < EventLoop + Send >
28
28
}
29
29
30
30
struct BasicLoop {
31
- work : Vec < proc ( ) : Send > , // pending work
32
- remotes : Vec < ( uint , Box < Callback : Send > ) > ,
31
+ work : Vec < proc ( ) : Send > , // pending work
32
+ remotes : Vec < ( uint , Box < Callback + Send > ) > ,
33
33
next_remote : uint ,
34
34
messages : Arc < Exclusive < Vec < Message > > > ,
35
- idle : Option < Box < Callback : Send > > ,
35
+ idle : Option < Box < Callback + Send > > ,
36
36
idle_active : Option < Arc < atomics:: AtomicBool > > ,
37
37
}
38
38
@@ -132,22 +132,22 @@ impl EventLoop for BasicLoop {
132
132
}
133
133
134
134
// FIXME: Seems like a really weird requirement to have an event loop provide.
135
- fn pausable_idle_callback ( & mut self , cb : Box < Callback : Send > )
136
- -> Box < PausableIdleCallback : Send > {
135
+ fn pausable_idle_callback ( & mut self , cb : Box < Callback + Send > )
136
+ -> Box < PausableIdleCallback + Send > {
137
137
rtassert ! ( self . idle. is_none( ) ) ;
138
138
self . idle = Some ( cb) ;
139
139
let a = Arc :: new ( atomics:: AtomicBool :: new ( true ) ) ;
140
140
self . idle_active = Some ( a. clone ( ) ) ;
141
- box BasicPausable { active : a } as Box < PausableIdleCallback : Send >
141
+ box BasicPausable { active : a } as Box < PausableIdleCallback + Send >
142
142
}
143
143
144
- fn remote_callback ( & mut self , f : Box < Callback : Send > )
145
- -> Box < RemoteCallback : Send > {
144
+ fn remote_callback ( & mut self , f : Box < Callback + Send > )
145
+ -> Box < RemoteCallback + Send > {
146
146
let id = self . next_remote ;
147
147
self . next_remote += 1 ;
148
148
self . remotes . push ( ( id, f) ) ;
149
149
box BasicRemote :: new ( self . messages . clone ( ) , id) as
150
- Box < RemoteCallback : Send >
150
+ Box < RemoteCallback + Send >
151
151
}
152
152
153
153
fn io < ' a > ( & ' a mut self ) -> Option < & ' a mut IoFactory > { None }
0 commit comments