diff --git a/crates/utils/src/rate_limit/rate_limiter.rs b/crates/utils/src/rate_limit/rate_limiter.rs index a965c79bb..46b6b0c72 100644 --- a/crates/utils/src/rate_limit/rate_limiter.rs +++ b/crates/utils/src/rate_limit/rate_limiter.rs @@ -18,19 +18,11 @@ pub(crate) enum RateLimitType { } /// Rate limiting based on rate type and IP addr -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Default)] pub struct RateLimiter { buckets: HashMap>, } -impl Default for RateLimiter { - fn default() -> Self { - Self { - buckets: HashMap::>::new(), - } - } -} - impl RateLimiter { fn insert_ip(&mut self, ip: &IpAddr) { for rate_limit_type in RateLimitType::iter() { diff --git a/crates/utils/src/request.rs b/crates/utils/src/request.rs index a881cf02c..f1655710e 100644 --- a/crates/utils/src/request.rs +++ b/crates/utils/src/request.rs @@ -114,6 +114,7 @@ pub(crate) struct PictrsResponse { #[derive(Deserialize, Debug, Clone)] pub(crate) struct PictrsFile { file: String, + #[allow(dead_code)] delete_token: String, }