From 99411f53100991a304038d666d942293f3ff3f18 Mon Sep 17 00:00:00 2001 From: adel Date: Sun, 27 Oct 2024 19:55:54 +0100 Subject: [PATCH] fix: Linters (#49) --- rust-toolchain.toml | 4 ++++ src/utils.rs | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 rust-toolchain.toml diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..662d23e --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,4 @@ +[toolchain] +channel = "1.82" +components = ["rustfmt", "clippy", "rust-analyzer"] +profile = "minimal" diff --git a/src/utils.rs b/src/utils.rs index c318a84..17bc21a 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -162,7 +162,7 @@ pub async fn get_blocks_with_txs( let mut resources = Vec::with_capacity(block_with_txs.transactions.len()); - #[cfg(with_sps)] + #[cfg(feature = "with_sps")] for tx in block_with_txs.transactions.iter() { let maybe_receipt = starknet_rpc .get_transaction_receipt(tx.transaction_hash()) @@ -185,7 +185,7 @@ pub async fn get_blocks_with_txs( resources.push(resource); } - #[cfg(not(with_sps))] + #[cfg(not(feature = "with_sps"))] for _ in block_with_txs.transactions.iter() { resources.push(ExecutionResources { computation_resources: ComputationResources {