From: Dessalines Date: Fri, 18 Mar 2022 15:26:16 +0000 (-0400) Subject: Show rate limit algorithm. Fixes #2136 X-Git-Url: http://these/git/%22%7Burl%7D/%22https:/image.com/%7B%60%24%7BghostArchiveUrl%7D/%7Brss%7D?a=commitdiff_plain;h=4e6d901649d7ac3c988870f7b975d81f02e10f57;p=lemmy.git Show rate limit algorithm. Fixes #2136 --- diff --git a/crates/utils/src/rate_limit/rate_limiter.rs b/crates/utils/src/rate_limit/rate_limiter.rs index 75b7808d..de5557ea 100644 --- a/crates/utils/src/rate_limit/rate_limiter.rs +++ b/crates/utils/src/rate_limit/rate_limiter.rs @@ -45,6 +45,7 @@ impl RateLimiter { } } + /// Rate limiting Algorithm described here: https://stackoverflow.com/a/668327/1655478 #[allow(clippy::float_cmp)] pub(super) fn check_rate_limit_full( &mut self,