diff options
author | Taiki Endo <te316e89@gmail.com> | 2019-08-11 04:28:52 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-11 04:28:52 +0900 |
commit | 6a125082e48c6e2334d64e4ebc5b6a988cf27b3f (patch) | |
tree | 55fe77fbd5656a1f61e9f686d80894afc78336d6 /tokio-tls | |
parent | d9f9c5658f135d2c5aca19ef435266170187c924 (diff) |
chore: apply unreachable_pub and missing_debug_implementations to all crates (#1424)
Diffstat (limited to 'tokio-tls')
-rw-r--r-- | tokio-tls/src/lib.rs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tokio-tls/src/lib.rs b/tokio-tls/src/lib.rs index 3d8900ce..06b997ab 100644 --- a/tokio-tls/src/lib.rs +++ b/tokio-tls/src/lib.rs @@ -1,5 +1,10 @@ #![doc(html_root_url = "https://docs.rs/tokio-tls/0.3.0-alpha.1")] -#![warn(rust_2018_idioms)] +#![warn( + missing_debug_implementations, + missing_docs, + rust_2018_idioms, + unreachable_pub +)] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] #![feature(async_await)] @@ -21,6 +26,7 @@ //! `native-tls` crate. use native_tls::{Error, HandshakeError, MidHandshakeTlsStream}; +use std::fmt; use std::future::Future; use std::io::{self, Read, Write}; use std::marker::Unpin; @@ -270,6 +276,12 @@ impl TlsConnector { } } +impl fmt::Debug for TlsConnector { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("TlsConnector").finish() + } +} + impl From<native_tls::TlsConnector> for TlsConnector { fn from(inner: native_tls::TlsConnector) -> TlsConnector { TlsConnector(inner) @@ -295,6 +307,12 @@ impl TlsAcceptor { } } +impl fmt::Debug for TlsAcceptor { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("TlsAcceptor").finish() + } +} + impl From<native_tls::TlsAcceptor> for TlsAcceptor { fn from(inner: native_tls::TlsAcceptor) -> TlsAcceptor { TlsAcceptor(inner) |