From d3aebb36212dfbaf545ccdbf1ab83979b133f657 Mon Sep 17 00:00:00 2001 From: jfldde <168934971+jfldde@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:37:02 +0100 Subject: [PATCH] Clippy --- src/bitcoin.rs | 4 ++-- src/citrea_config/rollup.rs | 2 +- src/citrea_config/sequencer.rs | 8 ++++---- src/client.rs | 2 +- src/config/rollup.rs | 2 +- src/utils.rs | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/bitcoin.rs b/src/bitcoin.rs index 9b9ded9..f7e9b4a 100644 --- a/src/bitcoin.rs +++ b/src/bitcoin.rs @@ -268,7 +268,7 @@ impl Restart for BitcoinNode { async fn start(&mut self, config: Option) -> Result<()> { if let Some(config) = config { - self.config = config + self.config = config; } self.spawn_output = Self::spawn(&self.config, &self.docker_env).await?; @@ -361,7 +361,7 @@ async fn wait_for_rpc_ready(client: &Client, timeout: Option) -> Resul Ok(_) => return Ok(()), Err(e) => { trace!("[wait_for_rpc_ready] error {e}"); - sleep(Duration::from_millis(500)).await + sleep(Duration::from_millis(500)).await; } } } diff --git a/src/citrea_config/rollup.rs b/src/citrea_config/rollup.rs index cc8fcf9..23bad87 100644 --- a/src/citrea_config/rollup.rs +++ b/src/citrea_config/rollup.rs @@ -86,7 +86,7 @@ const fn default_max_subscriptions_per_connection() -> u32 { pub struct StorageConfig { /// Path that can be utilized by concrete rollup implementation pub path: PathBuf, - /// File descriptor limit for RocksDB + /// File descriptor limit for `RocksDB` pub db_max_open_files: Option, } diff --git a/src/citrea_config/sequencer.rs b/src/citrea_config/sequencer.rs index 03babd8..412527e 100644 --- a/src/citrea_config/sequencer.rs +++ b/src/citrea_config/sequencer.rs @@ -29,7 +29,7 @@ impl Default for SequencerConfig { deposit_mempool_fetch_limit: 10, block_production_interval_ms: 100, da_update_interval_ms: 100, - mempool_conf: Default::default(), + mempool_conf: SequencerMempoolConfig::default(), } } } @@ -57,11 +57,11 @@ pub struct SequencerMempoolConfig { impl Default for SequencerMempoolConfig { fn default() -> Self { Self { - pending_tx_limit: 100000, + pending_tx_limit: 100_000, pending_tx_size: 200, - queue_tx_limit: 100000, + queue_tx_limit: 100_000, queue_tx_size: 200, - base_fee_tx_limit: 100000, + base_fee_tx_limit: 100_000, base_fee_tx_size: 200, max_account_slots: 16, } diff --git a/src/client.rs b/src/client.rs index 06feefb..2b70ca0 100644 --- a/src/client.rs +++ b/src/client.rs @@ -86,7 +86,7 @@ impl Client { self.client .get_sequencer_commitments_on_slot_by_hash(hash) .await - .map_err(|e| e.into()) + .map_err(Into::into) } pub async fn ledger_get_head_soft_confirmation_height(&self) -> Result { diff --git a/src/config/rollup.rs b/src/config/rollup.rs index 8e75183..cc6066d 100644 --- a/src/config/rollup.rs +++ b/src/config/rollup.rs @@ -66,7 +66,7 @@ impl From for BitcoinServiceConfig { node_password: v.rpc_password, network: v.network, da_private_key: None, - tx_backup_dir: "".to_string(), + tx_backup_dir: String::new(), } } } diff --git a/src/utils.rs b/src/utils.rs index c7fc00c..e913c9d 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -27,7 +27,7 @@ pub fn get_workspace_root() -> PathBuf { .to_path_buf() } -/// Get citrea path from CITREA_E2E_TEST_BINARY env +/// Get citrea path from `CITREA_E2E_TEST_BINARY` env pub fn get_citrea_path() -> Result { std::env::var("CITREA_E2E_TEST_BINARY") .map(PathBuf::from)