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

Add Default{Direct,Keyed}RateLimiter type aliases #173

Closed antifuchs closed 1 year ago

antifuchs commented 1 year ago

This fixes #85. That issue has been open very long and now that I had to pass a rate limiter in a function argument, I am feeling the pain too. Let's fix this once and for all.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 :tada:

Comparison is base (c21d713) 97.50% compared to head (9d6b4c2) 97.52%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #173 +/- ## ========================================== + Coverage 97.50% 97.52% +0.02% ========================================== Files 30 31 +1 Lines 2200 2220 +20 ========================================== + Hits 2145 2165 +20 Misses 55 55 ``` | [Impacted Files](https://codecov.io/gh/antifuchs/governor/pull/173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andreas+Fuchs) | Coverage Δ | | |---|---|---| | [governor/src/lib.rs](https://codecov.io/gh/antifuchs/governor/pull/173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andreas+Fuchs#diff-Z292ZXJub3Ivc3JjL2xpYi5ycw==) | `100.00% <ø> (ø)` | | | [governor/src/\_guide.rs](https://codecov.io/gh/antifuchs/governor/pull/173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andreas+Fuchs#diff-Z292ZXJub3Ivc3JjL19ndWlkZS5ycw==) | `100.00% <100.00%> (ø)` | | | [governor/tests/direct.rs](https://codecov.io/gh/antifuchs/governor/pull/173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andreas+Fuchs#diff-Z292ZXJub3IvdGVzdHMvZGlyZWN0LnJz) | `100.00% <100.00%> (ø)` | | | [governor/tests/keyed.rs](https://codecov.io/gh/antifuchs/governor/pull/173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andreas+Fuchs#diff-Z292ZXJub3IvdGVzdHMva2V5ZWQucnM=) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andreas+Fuchs). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andreas+Fuchs)

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

antifuchs commented 1 year ago

bors merge

bors[bot] commented 1 year ago

Build succeeded: