From 2a62dd4e47c92f0eb3a4124a665f678587fec66a Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Tue, 8 Aug 2023 15:50:50 -0700 Subject: [PATCH] lint --- web3_proxy_cli/src/sub_commands/create_key.rs | 2 +- web3_proxy_cli/src/sub_commands/create_user.rs | 2 +- web3_proxy_cli/src/test_utils/stats_accounting.rs | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/web3_proxy_cli/src/sub_commands/create_key.rs b/web3_proxy_cli/src/sub_commands/create_key.rs index e91d3ac5..5b53b4fa 100644 --- a/web3_proxy_cli/src/sub_commands/create_key.rs +++ b/web3_proxy_cli/src/sub_commands/create_key.rs @@ -41,7 +41,7 @@ impl CreateKeySubCommand { info!("user #{}", u.id); - let rpc_secret_key = self.rpc_secret_key.unwrap_or_else(RpcSecretKey::new); + let rpc_secret_key = self.rpc_secret_key.unwrap_or_default(); // create a key for the new user let uk = rpc_key::ActiveModel { diff --git a/web3_proxy_cli/src/sub_commands/create_user.rs b/web3_proxy_cli/src/sub_commands/create_user.rs index d7e553e5..dcb181b7 100644 --- a/web3_proxy_cli/src/sub_commands/create_user.rs +++ b/web3_proxy_cli/src/sub_commands/create_user.rs @@ -68,7 +68,7 @@ impl CreateUserSubCommand { Address::from_slice(u.address.as_ref()) ); - let rpc_secret_key = self.rpc_secret_key.unwrap_or_else(RpcSecretKey::new); + let rpc_secret_key = self.rpc_secret_key.unwrap_or_default(); // create a key for the new user let uk = rpc_key::ActiveModel { diff --git a/web3_proxy_cli/src/test_utils/stats_accounting.rs b/web3_proxy_cli/src/test_utils/stats_accounting.rs index 796d5712..eb18949d 100644 --- a/web3_proxy_cli/src/test_utils/stats_accounting.rs +++ b/web3_proxy_cli/src/test_utils/stats_accounting.rs @@ -70,7 +70,6 @@ pub async fn user_get_influx_stats_aggregated( chain_id: u64, ) -> serde_json::Value { let query_window_seconds = 300; - let chain_id = chain_id; let start = SystemTime::now(); let query_start = start .duration_since(UNIX_EPOCH)