From 8815b5c8cd402ff9e440cd34485eb6da164f2ef3 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Sun, 25 Jun 2023 21:26:28 -0700 Subject: [PATCH] lint --- web3_proxy/src/stats/influxdb_queries.rs | 4 ++-- web3_proxy/src/stats/mod.rs | 2 +- web3_proxy/src/stats/stat_buffer.rs | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/web3_proxy/src/stats/influxdb_queries.rs b/web3_proxy/src/stats/influxdb_queries.rs index 813707ad..571e1d50 100644 --- a/web3_proxy/src/stats/influxdb_queries.rs +++ b/web3_proxy/src/stats/influxdb_queries.rs @@ -29,7 +29,7 @@ use ulid::Ulid; pub async fn query_user_stats<'a>( app: &'a Web3ProxyApp, bearer: Option>>, - mut params: &'a HashMap, + params: &'a HashMap, stat_response_type: StatType, ) -> Web3ProxyResponse { let (caller_user_id, _semaphore) = match bearer { @@ -51,7 +51,7 @@ pub async fn query_user_stats<'a>( let user_id: u64 = params .get("user_id") .and_then(|x| x.parse::().ok()) - .unwrap_or_else(|| caller_user_id); + .unwrap_or(caller_user_id); let db_replica = app.db_replica()?; diff --git a/web3_proxy/src/stats/mod.rs b/web3_proxy/src/stats/mod.rs index ef84ad87..3d73646c 100644 --- a/web3_proxy/src/stats/mod.rs +++ b/web3_proxy/src/stats/mod.rs @@ -31,7 +31,7 @@ use std::num::NonZeroU64; use std::str::FromStr; use std::sync::atomic::{self, Ordering}; use std::sync::Arc; -use tracing::{trace, warn}; +use tracing::trace; pub use stat_buffer::{SpawnedStatBuffer, StatBuffer}; diff --git a/web3_proxy/src/stats/stat_buffer.rs b/web3_proxy/src/stats/stat_buffer.rs index 7db8554c..6e4c8c1e 100644 --- a/web3_proxy/src/stats/stat_buffer.rs +++ b/web3_proxy/src/stats/stat_buffer.rs @@ -8,8 +8,6 @@ use hashbrown::HashMap; use influxdb2::api::write::TimestampPrecision; use migration::sea_orm::prelude::Decimal; use migration::sea_orm::DatabaseConnection; -use parking_lot::RwLock; -use std::sync::Arc; use std::time::Duration; use tokio::sync::broadcast; use tokio::time::interval;