Andreas Fuchs
Andreas Fuchs
OK, so taking a closer look at this, I can't actually reproduce the issue in tests (I added this in tests/direct.rs): ```rust #[cfg(feature = "std")] #[test] fn stresstest_large_quotas() { use...
~Uh, tell a lie: It's failing on nightly but not on stable: https://github.com/antifuchs/governor/actions/runs/6198549159/job/16829195167?pr=207#step:7:258 - what version are you testing with?~ My mistake, they all fail/flake in CI (so... linux, vs....
Hah, ok, the quota was completely innocent, it was the GCRA constructor-from-quota that set `tau` to 0, which then results in a burst size of 0. I think I've got...
Thanks for posting this - I've been thinking about something like this all that time (it's a bit similar to #131, but not similar enough to warrant the same solution!)....
Oho, yeah, I think I see that this could be useful! I originally (prior to middleware) intentionally didn't add this functionality because keyed rate limiters can use much less memory...
No, I haven't made any attempt at getting this off the ground yet. I believe the comment I left above still is just about the outline of what needs to...
...wow. That's really clever. I think we can add constructors like that, but I'm not sure it should go on the "main" module, per se. The way these constructors are...
Yep, I think we're on the same page! I am definitely open to getting a more ergonomic way of passing constant numbers in there & will explore the shape that...
So with #203, I've been looking at Quotas some more and I can't make your example fail at compile time. Here's what I'm working with: https://play.rust-lang.org/?version=stable&mode=release&edition=2021&gist=910426a874f4d2d2d64d8fc606d50ab1, and it compiles but...
So, I think I understand what's going on now: The expression in `not_zero` is not guaranteed to be evaluated in a const context. It is, however, possible to use `#![feature(inline_const)]`...