boinkor-net / governor

A rate-limiting library for Rust (f.k.a. ratelimit_meter)
https://github.com/boinkor-net/governor
MIT License
579 stars 45 forks source link

Remove the quanta reference instant #188

Closed antifuchs closed 1 year ago

antifuchs commented 1 year ago

We can always pass a 0 (which stands for an arbitrary point in time, but so does the original reference) to delta, which means there's one fewer 64 bit integer to keep around per RateLimiter.

antifuchs commented 1 year ago

bors merge

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01 :warning:

Comparison is base (aa70cfa) 97.69% compared to head (e56736e) 97.69%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #188 +/- ## ========================================== - Coverage 97.69% 97.69% -0.01% ========================================== Files 31 31 Lines 2209 2208 -1 ========================================== - Hits 2158 2157 -1 Misses 51 51 ``` | [Impacted Files](https://app.codecov.io/gh/antifuchs/governor/pull/188?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andreas+Fuchs) | Coverage Δ | | |---|---|---| | [governor/src/clock/quanta.rs](https://app.codecov.io/gh/antifuchs/governor/pull/188?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andreas+Fuchs#diff-Z292ZXJub3Ivc3JjL2Nsb2NrL3F1YW50YS5ycw==) | `98.52% <100.00%> (-0.03%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

bors[bot] commented 1 year ago

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here. For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.