mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-22 20:31:19 +00:00
Fix formatting for latest nightly (#ref 3467)
This commit is contained in:
parent
3578dab67f
commit
fc60b82f82
1 changed files with 3 additions and 1 deletions
|
@ -195,7 +195,9 @@ impl RateLimitStorage {
|
||||||
/// Remove buckets older than the given duration
|
/// Remove buckets older than the given duration
|
||||||
pub(super) fn remove_older_than(&mut self, duration: Duration, now: InstantSecs) {
|
pub(super) fn remove_older_than(&mut self, duration: Duration, now: InstantSecs) {
|
||||||
// Only retain buckets that were last used after `instant`
|
// 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<_>| {
|
let is_recently_used = |group: &RateLimitedGroup<_>| {
|
||||||
group
|
group
|
||||||
|
|
Loading…
Reference in a new issue