in #635, some subtle breaking changes were made to how `Buffer` works.
this is documented in the description of that PR, here:
> I had to change some of the integration tests slightly as part of this
> change. This is because the buffer implementation using semaphore
> permits is _very subtly_ different from one using a bounded channel. In
> the `Semaphore`-based implementation, a semaphore permit is stored in
> the `Message` struct sent over the channel. This is so that the capacity
> is used as long as the message is in flight. However, when the worker
> task is processing a message that's been recieved from the channel,
> the permit is still not dropped. Essentially, the one message actively
> held by the worker task _also_ occupies one "slot" of capacity, so the
> actual channel capacity is one less than the value passed to the
> constructor, _once the first request has been sent to the worker_. The
> bounded MPSC changed this behavior so that capacity is only occupied
> while a request is actually in the channel, which broke some tests
> that relied on the old (and technically wrong) behavior.
bear particular attention to this:
> The bounded MPSC changed this behavior so that capacity is only
> occupied while a request is actually in the channel, which broke some
> tests that relied on the old (and technically wrong) behavior.
this is a change in behavior that might affect downstream callers.
this commit adds mention of these changes to the changelog, to help
consumers navigate the upgrade from tower 0.4 to 0.5.
Signed-off-by: katelyn martin <me+cratelyn@katelyn.world>
in #654, breaking changes were made to the `Buffer` type. this commit
adds mention of these breaking changes to the changelog, so that users
upgrading from 0.4 to 0.5 can have record of what changed, and why.
`Budget` is now a trait in the 0.5 release. this is a breaking change relative to the 0.4 release, where it was a concrete [struct](https://docs.rs/tower/0.4.13/tower/retry/budget/struct.Budget.html).
this commit updates the changelog to characterize this as a breaking change, rather than an additive change.
in #637, breaking changes were made to the `Either<A, B>` service.
this commit adds documentation of these breaking changes to the changelog, so that users upgrading from 0.4 to 0.5 have record of what changed when, and why.
* feat: Make new functions const when possible
The main reason was to allow to initialize the RateLimitLayer in a const context.
So why not making ever new function const (wherever it's possible). :P
* Change the assert to use an MSRV-compatible function.
---------
Co-authored-by: Toby Lawrence <tobz@users.noreply.github.com>
these were not used, as the only parameters used
come from the impl block (directly and indirectly)
Co-authored-by: Toby Lawrence <tobz@users.noreply.github.com>
This commit uses the correct form of "it's".
"Its" is possessive describes a noun, while "it's" is a contraction that
is short for "it is". Since "ready" is not a noun, we must use the
contraction in this case.
In addition, this commit adds some missing commas.
Co-authored-by: Eliza Weisman <eliza@buoyant.io>
This layer is similar to a BoxLayer, but produces a BoxCloneService instead, so can be used when
the underlying layers must be clone.
Co-authored-by: Lucio Franco <luciofranco14@gmail.com>
One is handling poll_ready errors (#706).
The other is fixing the TODO about disarming poll_ready, since there is no disarm this makes sure
`poll_ready` is only called if `call` will immediately follow.