From 626b094754cc52973adbfc8d2b9790701d54ef84 Mon Sep 17 00:00:00 2001 From: Alice Carroll Date: Mon, 9 Sep 2024 20:46:10 +0300 Subject: [PATCH] build: suppress `clippy::wildcard_imports` in generated code (#1937) --- tonic-build/src/client.rs | 1 + tonic-build/src/server.rs | 1 + tonic-health/src/generated/grpc_health_v1.rs | 16 ++++++++++++++-- .../src/generated/grpc_reflection_v1.rs | 16 ++++++++++++++-- .../src/generated/grpc_reflection_v1alpha.rs | 16 ++++++++++++++-- 5 files changed, 44 insertions(+), 6 deletions(-) diff --git a/tonic-build/src/client.rs b/tonic-build/src/client.rs index eca8fa1c6..42b9fdf47 100644 --- a/tonic-build/src/client.rs +++ b/tonic-build/src/client.rs @@ -49,6 +49,7 @@ pub(crate) fn generate_internal( unused_variables, dead_code, missing_docs, + clippy::wildcard_imports, // will trigger if compression is disabled clippy::let_unit_value, )] diff --git a/tonic-build/src/server.rs b/tonic-build/src/server.rs index c7b70182d..0d88018d9 100644 --- a/tonic-build/src/server.rs +++ b/tonic-build/src/server.rs @@ -100,6 +100,7 @@ pub(crate) fn generate_internal( unused_variables, dead_code, missing_docs, + clippy::wildcard_imports, // will trigger if compression is disabled clippy::let_unit_value, )] diff --git a/tonic-health/src/generated/grpc_health_v1.rs b/tonic-health/src/generated/grpc_health_v1.rs index 1d81a570c..428e32883 100644 --- a/tonic-health/src/generated/grpc_health_v1.rs +++ b/tonic-health/src/generated/grpc_health_v1.rs @@ -57,7 +57,13 @@ pub mod health_check_response { } /// Generated client implementations. pub mod health_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -198,7 +204,13 @@ pub mod health_client { } /// Generated server implementations. pub mod health_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with HealthServer. #[async_trait] diff --git a/tonic-reflection/src/generated/grpc_reflection_v1.rs b/tonic-reflection/src/generated/grpc_reflection_v1.rs index 501fbb8ea..2f454728e 100644 --- a/tonic-reflection/src/generated/grpc_reflection_v1.rs +++ b/tonic-reflection/src/generated/grpc_reflection_v1.rs @@ -146,7 +146,13 @@ pub struct ErrorResponse { } /// Generated client implementations. pub mod server_reflection_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -255,7 +261,13 @@ pub mod server_reflection_client { } /// Generated server implementations. pub mod server_reflection_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with ServerReflectionServer. #[async_trait] diff --git a/tonic-reflection/src/generated/grpc_reflection_v1alpha.rs b/tonic-reflection/src/generated/grpc_reflection_v1alpha.rs index ebe86aa92..237312987 100644 --- a/tonic-reflection/src/generated/grpc_reflection_v1alpha.rs +++ b/tonic-reflection/src/generated/grpc_reflection_v1alpha.rs @@ -146,7 +146,13 @@ pub struct ErrorResponse { } /// Generated client implementations. pub mod server_reflection_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -255,7 +261,13 @@ pub mod server_reflection_client { } /// Generated server implementations. pub mod server_reflection_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with ServerReflectionServer. #[async_trait]