Skip to content

Commit

Permalink
remove unnecessary HRTB (#1211)
Browse files Browse the repository at this point in the history
  • Loading branch information
fakeshadow authored Feb 21, 2025
1 parent 7b96fdb commit c2de532
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion service/src/middleware/async_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ where

impl<S, Req, F, Res, Err> Service<Req> for PipelineT<S, F, marker::AsyncFn>
where
F: for<'s> core::ops::AsyncFn(&'s S, Req) -> Result<Res, Err>,
F: core::ops::AsyncFn(&S, Req) -> Result<Res, Err>,
{
type Response = Res;
type Error = Err;
Expand Down
2 changes: 1 addition & 1 deletion service/src/service/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub trait ServiceExt<Arg>: Service<Arg> {
/// Function version of [Self::enclosed] method.
fn enclosed_fn<T, Req, O>(self, func: T) -> PipelineT<Self, middleware::AsyncFn<T>, marker::BuildEnclosed>
where
T: for<'s> AsyncFn(&'s Self::Response, Req) -> O + Clone,
T: AsyncFn(&Self::Response, Req) -> O + Clone,
Self: Sized,
{
self.enclosed(middleware::AsyncFn(func))
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ where
/// See [middleware](crate::middleware) for more.
pub fn enclosed_fn<Req, T, O>(self, transform: T) -> App<EnclosedFnBuilder<R, T>, CF>
where
T: for<'s> AsyncFn(&'s R::Response, Req) -> O + Clone,
T: AsyncFn(&R::Response, Req) -> O + Clone,
{
App {
router: self.router.enclosed_fn(transform),
Expand Down
1 change: 0 additions & 1 deletion web/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ where
S::Response: ReadyService + Service<Request<RequestExt<RequestBody>>, Response = Response<ResB>> + 'static,
S::Error: fmt::Debug,
<S::Response as Service<Request<RequestExt<RequestBody>>>>::Error: fmt::Debug,

ResB: Stream<Item = Result<Bytes, BE>> + 'static,
BE: fmt::Debug + 'static,
{
Expand Down

0 comments on commit c2de532

Please sign in to comment.