Skip to content

Commit

Permalink
chore(web): Remove Clone Send and static lifetime bound from service (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto authored Sep 30, 2024
1 parent 2f0e0a6 commit 97ae25d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions tonic-web/src/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ impl GrpcWebLayer {
impl<S> Layer<S> for GrpcWebLayer
where
S: Service<http::Request<BoxBody>, Response = http::Response<BoxBody>>,
S: Send + 'static,
S::Future: Send + 'static,
{
type Service = GrpcWebService<S>;

Expand Down
4 changes: 0 additions & 4 deletions tonic-web/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ const DEFAULT_ALLOW_HEADERS: [HeaderName; 4] = [
pub fn enable<S>(service: S) -> CorsGrpcWeb<S>
where
S: Service<http::Request<BoxBody>, Response = http::Response<BoxBody>>,
S: Clone + Send + 'static,
S::Future: Send + 'static,
{
let cors = CorsLayer::new()
.allow_origin(AllowOrigin::mirror_request())
Expand All @@ -154,8 +152,6 @@ pub struct CorsGrpcWeb<S>(tower_http::cors::Cors<GrpcWebService<S>>);
impl<S> Service<http::Request<BoxBody>> for CorsGrpcWeb<S>
where
S: Service<http::Request<BoxBody>, Response = http::Response<BoxBody>>,
S: Clone + Send + 'static,
S::Future: Send + 'static,
{
type Response = S::Response;
type Error = S::Error;
Expand Down

0 comments on commit 97ae25d

Please sign in to comment.