mirror of
https://github.com/fafhrd91/actix-net
synced 2025-06-26 20:57:43 +02:00
fmt with import grouping
This commit is contained in:
@ -15,8 +15,9 @@
|
||||
//! http --verify=false https://127.0.0.1:8443
|
||||
//! ```
|
||||
|
||||
// this use only exists because of how we have organised the crate
|
||||
// it is not necessary for your actual code
|
||||
#[rustfmt::skip]
|
||||
// this `use` is only exists because of how we have organised the crate
|
||||
// it is not necessary for your actual code; you should import from `rustls` directly
|
||||
use tokio_rustls::rustls;
|
||||
|
||||
use std::{
|
||||
|
@ -20,7 +20,6 @@ pub mod reexports {
|
||||
//! Re-exports from `native-tls` and `tokio-native-tls` that are useful for connectors.
|
||||
|
||||
pub use tokio_native_tls::native_tls::TlsConnector;
|
||||
|
||||
pub use tokio_native_tls::TlsStream as AsyncTlsStream;
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,6 @@ pub mod reexports {
|
||||
pub use openssl::ssl::{
|
||||
Error, HandshakeError, SslConnector, SslConnectorBuilder, SslMethod,
|
||||
};
|
||||
|
||||
pub use tokio_openssl::SslStream as AsyncSslStream;
|
||||
}
|
||||
|
||||
|
@ -26,10 +26,8 @@ use crate::connect::{Connection, Host};
|
||||
pub mod reexports {
|
||||
//! Re-exports from `rustls` and `webpki_roots` that are useful for connectors.
|
||||
|
||||
pub use tokio_rustls::rustls::ClientConfig;
|
||||
|
||||
pub use tokio_rustls::client::TlsStream as AsyncTlsStream;
|
||||
|
||||
pub use tokio_rustls::rustls::ClientConfig;
|
||||
pub use webpki_roots::TLS_SERVER_ROOTS;
|
||||
}
|
||||
|
||||
|
@ -51,13 +51,13 @@ fn openssl_acceptor(cert: String, key: String) -> tls_openssl::ssl::SslAcceptor
|
||||
mod danger {
|
||||
use std::time::SystemTime;
|
||||
|
||||
use super::*;
|
||||
|
||||
use tokio_rustls::rustls::{
|
||||
self,
|
||||
client::{ServerCertVerified, ServerCertVerifier},
|
||||
};
|
||||
|
||||
use super::*;
|
||||
|
||||
pub struct NoCertificateVerification;
|
||||
|
||||
impl ServerCertVerifier for NoCertificateVerification {
|
||||
|
@ -9,11 +9,10 @@ use actix_codec::{BytesCodec, Framed};
|
||||
use actix_rt::net::TcpStream;
|
||||
use actix_server::TestServer;
|
||||
use actix_service::{fn_service, Service, ServiceFactory};
|
||||
use actix_tls::connect::{ConnectError, ConnectInfo, Connection, Connector, Host};
|
||||
use bytes::Bytes;
|
||||
use futures_util::sink::SinkExt;
|
||||
|
||||
use actix_tls::connect::{ConnectError, ConnectInfo, Connection, Connector, Host};
|
||||
|
||||
#[cfg(feature = "openssl")]
|
||||
#[actix_rt::test]
|
||||
async fn test_string() {
|
||||
|
@ -8,11 +8,10 @@ use std::{
|
||||
use actix_rt::net::TcpStream;
|
||||
use actix_server::TestServer;
|
||||
use actix_service::{fn_service, Service, ServiceFactory};
|
||||
use futures_core::future::LocalBoxFuture;
|
||||
|
||||
use actix_tls::connect::{
|
||||
ConnectError, ConnectInfo, Connection, Connector, Host, Resolve, Resolver,
|
||||
};
|
||||
use futures_core::future::LocalBoxFuture;
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn custom_resolver() {
|
||||
|
Reference in New Issue
Block a user