@@ -152,9 +152,9 @@ impl<'a> LocalExecutor<'a> {
152152 let mut active = self . state ( ) . active ( ) ;
153153
154154 // Convert the futures into tasks.
155- let tasks = futures. into_iter ( ) . map ( move |future| {
156- self . spawn_inner ( future , & mut active )
157- } ) ;
155+ let tasks = futures
156+ . into_iter ( )
157+ . map ( move |future| self . spawn_inner ( future , & mut active ) ) ;
158158
159159 // Push the tasks to the user's collection.
160160 handles. extend ( tasks) ;
@@ -190,16 +190,16 @@ impl<'a> LocalExecutor<'a> {
190190 // the `Executor` is drained of all of its runnables. This ensures that
191191 // runnables are dropped and this precondition is satisfied.
192192 //
193- // `self.schedule()` is not `Send` nor `Sync`. As LocalExecutor is not
193+ // `self.schedule()` is not `Send` nor `Sync`. As LocalExecutor is not
194194 // `Send`, the `Waker` is guaranteed// to only be used on the same thread
195195 // it was spawned on.
196196 //
197- // `self.schedule()` is `'static`, and thus will outlive all borrowed
197+ // `self.schedule()` is `'static`, and thus will outlive all borrowed
198198 // variables in the future.
199199 let ( runnable, task) = unsafe {
200200 Builder :: new ( )
201- . propagate_panic ( true )
202- . spawn_unchecked ( |( ) | future, self . schedule ( ) )
201+ . propagate_panic ( true )
202+ . spawn_unchecked ( |( ) | future, self . schedule ( ) )
203203 } ;
204204 entry. insert ( runnable. waker ( ) ) ;
205205
@@ -407,7 +407,9 @@ impl State {
407407 // A future that runs tasks forever.
408408 let run_forever = async {
409409 loop {
410- ticker. runnable ( ) . await . run ( ) ;
410+ for _ in 0 ..200 {
411+ ticker. runnable ( ) . await . run ( ) ;
412+ }
411413 future:: yield_now ( ) . await ;
412414 }
413415 } ;
0 commit comments