File tree 1 file changed +1
-11
lines changed 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -183,19 +183,9 @@ impl TaskPool {
183
183
184
184
f ( & mut scope) ;
185
185
186
- #[ allow( clippy:: suspicious_else_formatting) ]
187
186
if scope. spawned . is_empty ( ) {
188
187
Vec :: default ( )
189
- }
190
- // A previous instance of this code tried to optimize the case of a single task by immediately calling
191
- // future::block_on. However, @willcrichton observed an issue where a scope created within an async task
192
- // (that was already being executed via future::block_on) would hang on the inner task when recursively
193
- // calling future::block_on. Therefore this feature is disabled until someone decides it's needed and
194
- // comes up with a fix.
195
- /* else if scope.spawned.len() == 1 {
196
- vec![future::block_on(&mut scope.spawned[0])]
197
- } */
198
- else {
188
+ } else {
199
189
let fut = async move {
200
190
let mut results = Vec :: with_capacity ( scope. spawned . len ( ) ) ;
201
191
for task in scope. spawned {
You can’t perform that action at this time.
0 commit comments