@@ -218,26 +218,26 @@ impl WritableStore {
218
218
219
219
fn transact_block_operations (
220
220
& self ,
221
- block_ptr_to : BlockPtr ,
222
- firehose_cursor : Option < String > ,
223
- mods : Vec < EntityModification > ,
221
+ block_ptr_to : & BlockPtr ,
222
+ firehose_cursor : Option < & str > ,
223
+ mods : & [ EntityModification ] ,
224
224
stopwatch : StopwatchMetrics ,
225
- data_sources : Vec < StoredDynamicDataSource > ,
226
- deterministic_errors : Vec < SubgraphError > ,
225
+ data_sources : & [ StoredDynamicDataSource ] ,
226
+ deterministic_errors : & [ SubgraphError ] ,
227
227
) -> Result < ( ) , StoreError > {
228
228
assert ! (
229
- same_subgraph( & mods, & self . site. deployment) ,
229
+ same_subgraph( mods, & self . site. deployment) ,
230
230
"can only transact operations within one shard"
231
231
) ;
232
232
self . retry ( "transact_block_operations" , move || {
233
233
let event = self . writable . transact_block_operations (
234
234
self . site . clone ( ) ,
235
- & block_ptr_to,
236
- firehose_cursor. as_deref ( ) ,
237
- & mods,
235
+ block_ptr_to,
236
+ firehose_cursor,
237
+ mods,
238
238
stopwatch. cheap_clone ( ) ,
239
- & data_sources,
240
- & deterministic_errors,
239
+ data_sources,
240
+ deterministic_errors,
241
241
) ?;
242
242
243
243
let _section = stopwatch. start_section ( "send_store_event" ) ;
@@ -319,7 +319,7 @@ impl WritableStore {
319
319
}
320
320
}
321
321
322
- fn same_subgraph ( mods : & Vec < EntityModification > , id : & DeploymentHash ) -> bool {
322
+ fn same_subgraph ( mods : & [ EntityModification ] , id : & DeploymentHash ) -> bool {
323
323
mods. iter ( ) . all ( |md| & md. entity_key ( ) . subgraph_id == id)
324
324
}
325
325
@@ -407,12 +407,12 @@ impl WritableStoreTrait for WritableAgent {
407
407
deterministic_errors : Vec < SubgraphError > ,
408
408
) -> Result < ( ) , StoreError > {
409
409
self . store . transact_block_operations (
410
- block_ptr_to. clone ( ) ,
411
- firehose_cursor. clone ( ) ,
412
- mods,
410
+ & block_ptr_to,
411
+ firehose_cursor. as_deref ( ) ,
412
+ & mods,
413
413
stopwatch,
414
- data_sources,
415
- deterministic_errors,
414
+ & data_sources,
415
+ & deterministic_errors,
416
416
) ?;
417
417
418
418
* self . block_ptr . lock ( ) . unwrap ( ) = Some ( block_ptr_to) ;
0 commit comments