Skip to content

Commit

Permalink
Fix use style
Browse files Browse the repository at this point in the history
  • Loading branch information
chengyuhui committed Feb 3, 2021
1 parent d751b41 commit 1fedd27
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
3 changes: 2 additions & 1 deletion crates/native-tls/src/tests.rs
Expand Up @@ -29,7 +29,8 @@ use native_tls::{Certificate, TlsAcceptor};
use tokio::net::TcpStream as TokioTcpStream;
use tokio::runtime::Runtime;

use trust_dns_proto::{iocompat::AsyncIoTokioAsStd, xfer::SerialMessage};
use trust_dns_proto::iocompat::AsyncIoTokioAsStd;
use trust_dns_proto::xfer::SerialMessage;

#[allow(clippy::useless_attribute)]
#[allow(unused)]
Expand Down
6 changes: 2 additions & 4 deletions crates/native-tls/src/tls_stream.rs
Expand Up @@ -17,12 +17,10 @@ use native_tls::Protocol::Tlsv12;
use native_tls::{Certificate, Identity, TlsConnector};
use tokio_native_tls::{TlsConnector as TokioTlsConnector, TlsStream as TokioTlsStream};

use trust_dns_proto::iocompat::{AsyncIoStdAsTokio, AsyncIoTokioAsStd};
use trust_dns_proto::tcp::Connect;
use trust_dns_proto::tcp::TcpStream;
use trust_dns_proto::xfer::{BufStreamHandle, StreamReceiver};
use trust_dns_proto::{
iocompat::{AsyncIoStdAsTokio, AsyncIoTokioAsStd},
tcp::Connect,
};

/// A TlsStream counterpart to the TcpStream which embeds a secure TlsStream
pub type TlsStream<S> = TcpStream<AsyncIoTokioAsStd<TokioTlsStream<AsyncIoStdAsTokio<S>>>>;
Expand Down
6 changes: 2 additions & 4 deletions crates/openssl/src/tls_stream.rs
Expand Up @@ -19,12 +19,10 @@ use openssl::x509::store::X509StoreBuilder;
use openssl::x509::{X509Ref, X509};
use tokio_openssl::{self, SslStream as TokioTlsStream};

use trust_dns_proto::iocompat::{AsyncIoStdAsTokio, AsyncIoTokioAsStd};
use trust_dns_proto::tcp::Connect;
use trust_dns_proto::tcp::TcpStream;
use trust_dns_proto::xfer::BufStreamHandle;
use trust_dns_proto::{
iocompat::{AsyncIoStdAsTokio, AsyncIoTokioAsStd},
tcp::Connect,
};

pub trait TlsIdentityExt {
fn identity(&mut self, pkcs12: &ParsedPkcs12) -> io::Result<()> {
Expand Down
4 changes: 3 additions & 1 deletion crates/openssl/tests/openssl_tests.rs
Expand Up @@ -30,7 +30,9 @@ use openssl::pkcs12::*;
use openssl::rsa::*;
use openssl::x509::extension::*;

use trust_dns_proto::{iocompat::AsyncIoTokioAsStd, tcp::Connect, xfer::SerialMessage};
use trust_dns_proto::iocompat::AsyncIoTokioAsStd;
use trust_dns_proto::tcp::Connect;
use trust_dns_proto::xfer::SerialMessage;

use trust_dns_openssl::TlsStreamBuilder;

Expand Down
6 changes: 4 additions & 2 deletions crates/rustls/src/tests.rs
Expand Up @@ -26,9 +26,11 @@ use openssl::x509::*;
use futures_util::stream::StreamExt;
use rustls::Certificate;
use rustls::ClientConfig;
use tokio::{net::TcpStream as TokioTcpStream, runtime::Runtime};
use tokio::net::TcpStream as TokioTcpStream;
use tokio::runtime::Runtime;

use trust_dns_proto::{iocompat::AsyncIoTokioAsStd, xfer::SerialMessage};
use trust_dns_proto::iocompat::AsyncIoTokioAsStd;
use trust_dns_proto::xfer::SerialMessage;

use crate::tls_connect;

Expand Down
6 changes: 2 additions & 4 deletions crates/rustls/src/tls_stream.rs
Expand Up @@ -20,12 +20,10 @@ use tokio::net::TcpStream as TokioTcpStream;
use tokio_rustls::TlsConnector;
use webpki::{DNSName, DNSNameRef};

use trust_dns_proto::iocompat::{AsyncIoStdAsTokio, AsyncIoTokioAsStd};
use trust_dns_proto::tcp::Connect;
use trust_dns_proto::tcp::{DnsTcpStream, TcpStream};
use trust_dns_proto::xfer::{BufStreamHandle, StreamReceiver};
use trust_dns_proto::{
iocompat::{AsyncIoStdAsTokio, AsyncIoTokioAsStd},
tcp::Connect,
};

/// Predefined type for abstracting the TlsClientStream with TokioTls
pub type TokioTlsClientStream<S> = tokio_rustls::client::TlsStream<AsyncIoStdAsTokio<S>>;
Expand Down
3 changes: 2 additions & 1 deletion tests/integration-tests/src/tls_client_connection.rs
Expand Up @@ -16,8 +16,9 @@ use futures::Future;

use trust_dns_client::client::ClientConnection;
use trust_dns_client::rr::dnssec::Signer;
use trust_dns_proto::error::ProtoError;
use trust_dns_proto::tcp::Connect;
use trust_dns_proto::xfer::{DnsMultiplexer, DnsMultiplexerConnect};
use trust_dns_proto::{error::ProtoError, tcp::Connect};

use rustls::ClientConfig;
use trust_dns_rustls::{tls_client_connect, TlsClientStream};
Expand Down

0 comments on commit 1fedd27

Please sign in to comment.