From 0b17dbabf05906a577f7a6a59efe3308dabef2ef Mon Sep 17 00:00:00 2001 From: tottoto Date: Sun, 3 Sep 2023 20:13:18 +0900 Subject: [PATCH] chore(tls): Remove unused tls field when tls feature is not used --- tonic/src/transport/service/connector.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tonic/src/transport/service/connector.rs b/tonic/src/transport/service/connector.rs index b672f3bf3..fc603629e 100644 --- a/tonic/src/transport/service/connector.rs +++ b/tonic/src/transport/service/connector.rs @@ -22,15 +22,12 @@ pub(crate) struct Connector { inner: C, #[cfg(feature = "tls")] tls: Option, - #[cfg(not(feature = "tls"))] - #[allow(dead_code)] - tls: Option<()>, } impl Connector { #[cfg(not(feature = "tls"))] pub(crate) fn new(inner: C) -> Self { - Self { inner, tls: None } + Self { inner } } #[cfg(feature = "tls")]