diff --git a/riven/src/req/rate_limit.rs b/riven/src/req/rate_limit.rs index 949d356..6664dd1 100644 --- a/riven/src/req/rate_limit.rs +++ b/riven/src/req/rate_limit.rs @@ -242,7 +242,7 @@ impl RateLimit { } } -fn buckets_require_updating(limit_header: &str, buckets: &[VectorTokenBucket]) -> bool { +fn buckets_require_updating(limit_header: &str, buckets: &[impl TokenBucket]) -> bool { if buckets.len() != limit_header.split(',').count() { return true; } diff --git a/riven/src/req/token_bucket.rs b/riven/src/req/token_bucket.rs index 44cb882..5c02ba8 100644 --- a/riven/src/req/token_bucket.rs +++ b/riven/src/req/token_bucket.rs @@ -30,11 +30,13 @@ pub trait TokenBucket { /// Get the duration of this bucket. /// # Returns /// Duration of the bucket. + #[allow(dead_code, reason = "false positive")] fn get_bucket_duration(&self) -> Duration; /// Get the total limit of this bucket per timespan. /// # Returns /// Total limit per timespan. + #[allow(dead_code, reason = "false positive")] fn get_total_limit(&self) -> usize; }