@@ -119,13 +119,17 @@ impl AsyncOpsState {
119
119
self . async_ops . values ( ) . map ( Rc :: downgrade)
120
120
}
121
121
122
+ // Clippy warns us that having too many arguments is bad style. In this case, however
123
+ // it does not make much sense to group any of them.
124
+ #[ allow( clippy:: too_many_arguments) ]
122
125
pub ( crate ) fn update_async_ops (
123
126
& mut self ,
124
127
styles : & view:: Styles ,
125
128
strings : & mut intern:: Strings ,
126
129
metas : & HashMap < u64 , Metadata > ,
127
130
update : proto:: async_ops:: AsyncOpUpdate ,
128
131
resource_ids : & mut Ids ,
132
+ task_ids : & mut Ids ,
129
133
visibility : Visibility ,
130
134
) {
131
135
let mut stats_update = update. stats_update ;
@@ -155,8 +159,13 @@ impl AsyncOpsState {
155
159
} ;
156
160
157
161
let span_id = async_op. id ?. id ;
158
- let stats =
159
- AsyncOpStats :: from_proto ( stats_update. remove ( & span_id) ?, meta, styles, strings) ;
162
+ let stats = AsyncOpStats :: from_proto (
163
+ stats_update. remove ( & span_id) ?,
164
+ meta,
165
+ styles,
166
+ strings,
167
+ task_ids,
168
+ ) ;
160
169
161
170
let num = self . ids . id_for ( span_id) ;
162
171
let resource_id = resource_ids. id_for ( async_op. resource_id ?. id ) ;
@@ -187,7 +196,8 @@ impl AsyncOpsState {
187
196
if let Some ( async_op) = self . async_ops . get_mut ( & num) {
188
197
let mut async_op = async_op. borrow_mut ( ) ;
189
198
if let Some ( meta) = metas. get ( & async_op. meta_id ) {
190
- async_op. stats = AsyncOpStats :: from_proto ( stats, meta, styles, strings) ;
199
+ async_op. stats =
200
+ AsyncOpStats :: from_proto ( stats, meta, styles, strings, task_ids) ;
191
201
}
192
202
}
193
203
}
@@ -275,6 +285,7 @@ impl AsyncOpStats {
275
285
meta : & Metadata ,
276
286
styles : & view:: Styles ,
277
287
strings : & mut intern:: Strings ,
288
+ task_ids : & mut Ids ,
278
289
) -> Self {
279
290
let mut pb = pb;
280
291
@@ -304,7 +315,7 @@ impl AsyncOpStats {
304
315
let busy = poll_stats. busy_time . map ( pb_duration) . unwrap_or_default ( ) ;
305
316
let idle = total. map ( |total| total - busy) ;
306
317
let formatted_attributes = Attribute :: make_formatted ( styles, & mut attributes) ;
307
- let task_id = pb. task_id . map ( |id| id. id ) ;
318
+ let task_id = pb. task_id . map ( |id| task_ids . id_for ( id. id ) ) ;
308
319
let task_id_str = strings. string (
309
320
task_id
310
321
. as_ref ( )
0 commit comments