Skip to content

Commit

Permalink
chore: Remove unnecessary static lifetime (#1877)
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto authored Aug 20, 2024
1 parent b4c3518 commit 7fb40a9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tonic-build/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ fn generate_named(server_service: &syn::Ident, service_name: &str) -> TokenStrea

quote! {
#name_doc
pub const SERVICE_NAME: &'static str = #service_name;
pub const SERVICE_NAME: &str = #service_name;

impl<T> tonic::server::NamedService for #server_service<T> {
const NAME: &'static str = SERVICE_NAME;
Expand Down
2 changes: 1 addition & 1 deletion tonic-health/src/generated/grpc_health_v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ pub mod health_server {
}
}
/// Generated gRPC service name
pub const SERVICE_NAME: &'static str = "grpc.health.v1.Health";
pub const SERVICE_NAME: &str = "grpc.health.v1.Health";
impl<T> tonic::server::NamedService for HealthServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
Expand Down
2 changes: 1 addition & 1 deletion tonic-reflection/src/generated/grpc_reflection_v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ pub mod server_reflection_server {
}
}
/// Generated gRPC service name
pub const SERVICE_NAME: &'static str = "grpc.reflection.v1.ServerReflection";
pub const SERVICE_NAME: &str = "grpc.reflection.v1.ServerReflection";
impl<T> tonic::server::NamedService for ServerReflectionServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
Expand Down
2 changes: 1 addition & 1 deletion tonic-reflection/src/generated/grpc_reflection_v1alpha.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ pub mod server_reflection_server {
}
}
/// Generated gRPC service name
pub const SERVICE_NAME: &'static str = "grpc.reflection.v1alpha.ServerReflection";
pub const SERVICE_NAME: &str = "grpc.reflection.v1alpha.ServerReflection";
impl<T> tonic::server::NamedService for ServerReflectionServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
Expand Down

0 comments on commit 7fb40a9

Please sign in to comment.