]> Untitled Git - lemmy.git/commitdiff
Show rate limit algorithm. Fixes #2136
authorDessalines <tyhou13@gmx.com>
Fri, 18 Mar 2022 15:26:16 +0000 (11:26 -0400)
committerDessalines <dessalines@users.noreply.github.com>
Tue, 22 Mar 2022 18:45:14 +0000 (18:45 +0000)
crates/utils/src/rate_limit/rate_limiter.rs

index 75b7808d3dede22fd1a056bf337dc423c4cb4457..de5557ea87716114fb48156fe3195811fbb12f0d 100644 (file)
@@ -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,