Skip to content

Commit 7390b73

Browse files
committed
Rename with_tls_hostname_override -> with_danger_tls_hostname_override
1 parent d78dfde commit 7390b73

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/opts/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ impl SslOpts {
181181

182182
/// If set, will override the hostname used to verify the server's certificate.
183183
///
184-
/// This is useful when connecting to a server via a tunnel, where the server hostname
185-
/// name is different from the hostname used to connect to the tunnel.
186-
pub fn with_tls_hostname_override<T: Into<Cow<'static, str>>>(
184+
/// This is useful when connecting to a server via a tunnel, where the server hostname is
185+
/// different from the hostname used to connect to the tunnel.
186+
pub fn with_danger_tls_hostname_override<T: Into<Cow<'static, str>>>(
187187
mut self,
188188
domain: Option<T>,
189189
) -> Self {
@@ -209,7 +209,7 @@ impl SslOpts {
209209
}
210210

211211
pub fn tls_hostname_override(&self) -> Option<&str> {
212-
self.tls_hostname_override.as_ref().map(AsRef::as_ref)
212+
self.tls_hostname_override.as_deref()
213213
}
214214
}
215215

0 commit comments

Comments
 (0)