Skip to content

Commit

Permalink
chore(volo-http): remove unnecessary generic constraints
Browse files Browse the repository at this point in the history
Signed-off-by: Yu Li <liyu.yukiteru@bytedance.com>
  • Loading branch information
wfly1998 committed May 23, 2024
1 parent b298843 commit e6b0d8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions volo-http/src/server/extract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,7 @@ where

impl<B, T> FromRequest<B> for Option<T>
where
B: Body + Send,
B::Data: Send,
B::Error: Send,
B: Send,
T: FromRequest<B, private::ViaRequest> + Sync,
{
type Rejection = Infallible;
Expand Down
5 changes: 1 addition & 4 deletions volo-http/src/server/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use std::{

use futures_util::future::BoxFuture;
use http::request::Parts;
use http_body::Body;
use motore::service::Service;

use super::{
Expand Down Expand Up @@ -61,9 +60,7 @@ macro_rules! impl_handler {
Res: IntoResponse,
$( for<'r> $ty: FromContext + Send + 'r, )*
for<'r> $last: FromRequest<B, M> + Send + 'r,
B: Body + Send,
B::Data: Send,
B::Error: Send,
B: Send,
{
async fn handle(self, cx: &mut ServerContext, req: ServerRequest<B>) -> ServerResponse {
let (mut parts, body) = req.into_parts();
Expand Down

0 comments on commit e6b0d8f

Please sign in to comment.