Skip to content

Commit 06437ab

Browse files
committed
added clippy attr to ignore storage_reads var for tests
1 parent 04a0877 commit 06437ab

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

forc-plugins/forc-client/src/op/call/call_function.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ pub async fn call_function(
152152
.await
153153
.map_err(|e| anyhow!("Failed to initialize transaction builder: {e}"))?;
154154

155-
let (tx, tx_execution, _storage_reads) = match mode {
155+
#[cfg_attr(test, allow(unused_variables))]
156+
let (tx, tx_execution, storage_reads) = match mode {
156157
cmd::call::ExecutionMode::DryRun => {
157158
let tx = call
158159
.build_tx(tb, &wallet)
@@ -200,7 +201,7 @@ pub async fn call_function(
200201
.map_err(|e| anyhow!("Failed to build transaction: {e}"))?;
201202
let tx_status = client.submit_and_await_commit(&tx.clone().into()).await?;
202203

203-
#[allow(unused_variables)]
204+
#[cfg_attr(test, allow(unused_variables))]
204205
let (block_height, tx_exec) = match tx_status {
205206
TransactionStatus::Success {
206207
block_height,
@@ -294,7 +295,7 @@ pub async fn call_function(
294295
&consensus_params,
295296
&script,
296297
tx_execution.result.receipts(),
297-
_storage_reads,
298+
storage_reads,
298299
&abi_map,
299300
)
300301
.await

0 commit comments

Comments
 (0)