-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove redundant Clone
, and Debug
bounds
#607
Remove redundant Clone
, and Debug
bounds
#607
Conversation
Clone
bounds (#606)Clone
bounds
Clone
boundsClone
, and Debug
bounds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
@LucioFranco do you want to take a look before we merge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question otherwise lgtm
@@ -112,6 +111,25 @@ where | |||
} | |||
} | |||
|
|||
impl<K, S, Req> fmt::Debug for ReadyCache<K, S, Req> | |||
where | |||
K: fmt::Debug + Eq + Hash, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is eq and hash required here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe there's a K: Hash + Eq
bound on the ReadyCache
type, which is required because K
is used as the key type to an IndexMap
:
tower/tower/src/ready_cache/cache.rs
Lines 57 to 60 in d25a6b0
pub struct ReadyCache<K, S, Req> | |
where | |
K: Eq + Hash, | |
{ |
Added - **util**: Add `CloneBoxService` which is a `Clone + Send` boxed `Service` ([#615]) - **util**: Add `ServiceExt::boxed` and `ServiceExt::clone_boxed` for applying the `BoxService` and `CloneBoxService` middleware ([#616]) - **builder**: Add `ServiceBuilder::boxed` and `ServiceBuilder::clone_boxed` for applying `BoxService` and `CloneBoxService` layers ([#616]) Fixed - **balance**: Remove redundant `Req: Clone` bound from `Clone` impls for `MakeBalance`, and `MakeBalanceLayer` ([#607]) - **balance**: Remove redundant `Req: Debug` bound from `Debug` impls for `MakeBalance`, `MakeFuture`, `Balance`, and `Pool` ([#607]) - **ready-cache**: Remove redundant `Req: Debug` bound from `Debug` impl for `ReadyCache` ([#607]) - **steer**: Remove redundant `Req: Debug` bound from `Debug` impl for `Steer` ([#607]) - **util**: Remove redundant `F: Clone` bound from `ServiceExt::map_request` ([#607]) - **docs**: Fix `doc(cfg(...))` attributes of `PeakEwmaDiscover`, and `PendingRequestsDiscover` ([#610]) - **util**: Remove unnecessary `Debug` bounds from `impl Debug for BoxService` ([#617]) - **util**: Remove unnecessary `Debug` bounds from `impl Debug for UnsyncBoxService` ([#617]) [#607]: #607 [#610]: #610 [#616]: #616 [#617]: #617 [#615]: #615
Added - **util**: Add `CloneBoxService` which is a `Clone + Send` boxed `Service` ([#615]) - **util**: Add `ServiceExt::boxed` and `ServiceExt::clone_boxed` for applying the `BoxService` and `CloneBoxService` middleware ([#616]) - **builder**: Add `ServiceBuilder::boxed` and `ServiceBuilder::clone_boxed` for applying `BoxService` and `CloneBoxService` layers ([#616]) Fixed - **balance**: Remove redundant `Req: Clone` bound from `Clone` impls for `MakeBalance`, and `MakeBalanceLayer` ([#607]) - **balance**: Remove redundant `Req: Debug` bound from `Debug` impls for `MakeBalance`, `MakeFuture`, `Balance`, and `Pool` ([#607]) - **ready-cache**: Remove redundant `Req: Debug` bound from `Debug` impl for `ReadyCache` ([#607]) - **steer**: Remove redundant `Req: Debug` bound from `Debug` impl for `Steer` ([#607]) - **util**: Remove redundant `F: Clone` bound from `ServiceExt::map_request` ([#607]) - **docs**: Fix `doc(cfg(...))` attributes of `PeakEwmaDiscover`, and `PendingRequestsDiscover` ([#610]) - **util**: Remove unnecessary `Debug` bounds from `impl Debug for BoxService` ([#617]) - **util**: Remove unnecessary `Debug` bounds from `impl Debug for UnsyncBoxService` ([#617]) [#607]: #607 [#610]: #610 [#616]: #616 [#617]: #617 [#615]: #615
* tower: prepare to release 0.4.11 Added - **util**: Add `CloneBoxService` which is a `Clone + Send` boxed `Service` ([#615]) - **util**: Add `ServiceExt::boxed` and `ServiceExt::clone_boxed` for applying the `BoxService` and `CloneBoxService` middleware ([#616]) - **builder**: Add `ServiceBuilder::boxed` and `ServiceBuilder::clone_boxed` for applying `BoxService` and `CloneBoxService` layers ([#616]) Fixed - **balance**: Remove redundant `Req: Clone` bound from `Clone` impls for `MakeBalance`, and `MakeBalanceLayer` ([#607]) - **balance**: Remove redundant `Req: Debug` bound from `Debug` impls for `MakeBalance`, `MakeFuture`, `Balance`, and `Pool` ([#607]) - **ready-cache**: Remove redundant `Req: Debug` bound from `Debug` impl for `ReadyCache` ([#607]) - **steer**: Remove redundant `Req: Debug` bound from `Debug` impl for `Steer` ([#607]) - **util**: Remove redundant `F: Clone` bound from `ServiceExt::map_request` ([#607]) - **docs**: Fix `doc(cfg(...))` attributes of `PeakEwmaDiscover`, and `PendingRequestsDiscover` ([#610]) - **util**: Remove unnecessary `Debug` bounds from `impl Debug for BoxService` ([#617]) - **util**: Remove unnecessary `Debug` bounds from `impl Debug for UnsyncBoxService` ([#617]) [#607]: #607 [#610]: #610 [#616]: #616 [#617]: #617 [#615]: #615 * sorting * Rename `CloneBoxService` to `BoxCloneService` * formatting * also update changelog
Closes #606