@@ -116,15 +116,9 @@ impl QueryService {
116
116
) -> Result < StateRoot , String > {
117
117
trace ! ( "retrieve_state_root epoch = {}" , epoch) ;
118
118
119
- // We cannot await in scope that contains call to format!
120
- // This is likely to be fixed in a future compiler version.
121
- // See: https://github.com/rust-lang/rust/issues/64960
122
- let msg =
123
- format ! ( "Timeout while retrieving state root for epoch {}" , epoch) ;
124
-
125
119
with_timeout (
126
- * MAX_POLL_TIME , /* timeout */
127
- msg , /* error */
120
+ * MAX_POLL_TIME ,
121
+ format ! ( "Timeout while retrieving state root for epoch {}" , epoch ) ,
128
122
self . with_io ( |io| self . handler . state_roots . request_now ( io, epoch) ) ,
129
123
)
130
124
. await
@@ -135,35 +129,20 @@ impl QueryService {
135
129
) -> Result < Option < Vec < u8 > > , String > {
136
130
trace ! ( "retrieve_state_entry epoch = {}, key = {:?}" , epoch, key) ;
137
131
138
- // We cannot await in scope that contains call to format!
139
- // This is likely to be fixed in a future compiler version.
140
- // See: https://github.com/rust-lang/rust/issues/64960
141
- let msg = format ! (
142
- "Timeout while retrieving state entry for epoch {} with key {:?}" ,
143
- epoch, key
144
- ) ;
145
-
146
132
with_timeout (
147
- * MAX_POLL_TIME , /* timeout */
148
- msg, /* error */
149
- self . with_io ( |io| {
150
- self . handler . state_entries . request_now ( io, epoch, key)
151
- } ) ,
133
+ * MAX_POLL_TIME ,
134
+ format ! ( "Timeout while retrieving state entry for epoch {} with key {:?}" , epoch, key) ,
135
+ self . with_io ( |io| self . handler . state_entries . request_now ( io, epoch, key) ) ,
152
136
)
153
137
. await
154
138
}
155
139
156
140
async fn retrieve_bloom ( & self , epoch : u64 ) -> Result < ( u64 , Bloom ) , String > {
157
141
trace ! ( "retrieve_bloom epoch = {}" , epoch) ;
158
142
159
- // We cannot await in scope that contains call to format!
160
- // This is likely to be fixed in a future compiler version.
161
- // See: https://github.com/rust-lang/rust/issues/64960
162
- let msg = format ! ( "Timeout while retrieving bloom for epoch {}" , epoch) ;
163
-
164
143
with_timeout (
165
- * MAX_POLL_TIME , /* timeout */
166
- msg , /* error */
144
+ * MAX_POLL_TIME ,
145
+ format ! ( "Timeout while retrieving bloom for epoch {}" , epoch ) ,
167
146
self . handler . blooms . request ( epoch) ,
168
147
)
169
148
. await
@@ -175,15 +154,9 @@ impl QueryService {
175
154
) -> Result < ( u64 , Vec < Vec < Receipt > > ) , String > {
176
155
trace ! ( "retrieve_receipts epoch = {}" , epoch) ;
177
156
178
- // We cannot await in scope that contains call to format!
179
- // This is likely to be fixed in a future compiler version.
180
- // See: https://github.com/rust-lang/rust/issues/64960
181
- let msg =
182
- format ! ( "Timeout while retrieving receipts for epoch {}" , epoch) ;
183
-
184
157
with_timeout (
185
- * MAX_POLL_TIME , /* timeout */
186
- msg , /* error */
158
+ * MAX_POLL_TIME ,
159
+ format ! ( "Timeout while retrieving receipts for epoch {}" , epoch ) ,
187
160
self . handler . receipts . request ( epoch) ,
188
161
)
189
162
. await
@@ -196,15 +169,9 @@ impl QueryService {
196
169
trace ! ( "retrieve_block_txs log = {:?}" , log) ;
197
170
let hash = log. block_hash ;
198
171
199
- // We cannot await in scope that contains call to format!
200
- // This is likely to be fixed in a future compiler version.
201
- // See: https://github.com/rust-lang/rust/issues/64960
202
- let msg =
203
- format ! ( "Timeout while retrieving block txs for block {}" , hash) ;
204
-
205
172
with_timeout (
206
- * MAX_POLL_TIME , /* timeout */
207
- msg , /* error */
173
+ * MAX_POLL_TIME ,
174
+ format ! ( "Timeout while retrieving block txs for block {}" , hash ) ,
208
175
self . handler . block_txs . request ( hash) ,
209
176
)
210
177
. await
@@ -216,14 +183,9 @@ impl QueryService {
216
183
) -> Result < ( SignedTransaction , Receipt , TransactionAddress ) , String > {
217
184
trace ! ( "retrieve_tx_info hash = {:?}" , hash) ;
218
185
219
- // We cannot await in scope that contains call to format!
220
- // This is likely to be fixed in a future compiler version.
221
- // See: https://github.com/rust-lang/rust/issues/64960
222
- let msg = format ! ( "Timeout while retrieving tx info for tx {}" , hash) ;
223
-
224
186
with_timeout (
225
- * MAX_POLL_TIME , /* timeout */
226
- msg , /* error */
187
+ * MAX_POLL_TIME ,
188
+ format ! ( "Timeout while retrieving tx info for tx {}" , hash ) ,
227
189
self . with_io ( |io| self . handler . tx_infos . request_now ( io, hash) ) ,
228
190
)
229
191
. await
@@ -374,15 +336,9 @@ impl QueryService {
374
336
) -> Result < SignedTransaction , String > {
375
337
info ! ( "get_tx hash={:?}" , hash) ;
376
338
377
- // We cannot await in scope that contains call to format!
378
- // This is likely to be fixed in a future compiler version.
379
- // See: https://github.com/rust-lang/rust/issues/64960
380
- let msg =
381
- format ! ( "Timeout while retrieving transaction with hash {}" , hash) ;
382
-
383
339
with_timeout (
384
- * MAX_POLL_TIME , /* timeout */
385
- msg , /* error */
340
+ * MAX_POLL_TIME ,
341
+ format ! ( "Timeout while retrieving transaction with hash {}" , hash ) ,
386
342
self . with_io ( |io| self . handler . txs . request_now ( io, hash) ) ,
387
343
)
388
344
. await
0 commit comments