From fc60b82f8264301202d6c118e8bf3c1de3f49968 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Mon, 3 Jul 2023 11:45:53 +0200 Subject: [PATCH] Fix formatting for latest nightly (#ref 3467) --- crates/utils/src/rate_limit/rate_limiter.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/utils/src/rate_limit/rate_limiter.rs b/crates/utils/src/rate_limit/rate_limiter.rs index 12f264fae..cea05bc08 100644 --- a/crates/utils/src/rate_limit/rate_limiter.rs +++ b/crates/utils/src/rate_limit/rate_limiter.rs @@ -195,7 +195,9 @@ impl RateLimitStorage { /// Remove buckets older than the given duration pub(super) fn remove_older_than(&mut self, duration: Duration, now: InstantSecs) { // Only retain buckets that were last used after `instant` - let Some(instant) = now.to_instant().checked_sub(duration) else { return }; + let Some(instant) = now.to_instant().checked_sub(duration) else { + return; + }; let is_recently_used = |group: &RateLimitedGroup<_>| { group