Skip to content

Commit

Permalink
chore(tls): Remove unused tls field when tls feature is not used
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto committed Sep 8, 2023
1 parent d59fe0d commit 1f3624c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tonic/src/transport/service/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,12 @@ pub(crate) struct Connector<C> {
inner: C,
#[cfg(feature = "tls")]
tls: Option<TlsConnector>,
#[cfg(not(feature = "tls"))]
#[allow(dead_code)]
tls: Option<()>,
}

impl<C> Connector<C> {
#[cfg(not(feature = "tls"))]
pub(crate) fn new(inner: C) -> Self {
Self { inner, tls: None }
Self { inner }
}

#[cfg(feature = "tls")]
Expand Down

0 comments on commit 1f3624c

Please sign in to comment.