run cargo fmt

This commit is contained in:
Alexis Mousset
2020-09-09 09:30:17 +02:00
committed by Alexis Mousset
parent 47dfdf7ee8
commit 31a3be1cba
7 changed files with 24 additions and 18 deletions

View File

@@ -1,5 +1,4 @@
use lettre::transport::smtp::authentication::Credentials;
use lettre::{Message, SmtpTransport, Transport};
use lettre::{transport::smtp::authentication::Credentials, Message, SmtpTransport, Transport};
fn main() {
tracing_subscriber::fmt::init();

View File

@@ -1,5 +1,4 @@
use lettre::transport::smtp::authentication::Credentials;
use lettre::{Message, SmtpTransport, Transport};
use lettre::{transport::smtp::authentication::Credentials, Message, SmtpTransport, Transport};
fn main() {
tracing_subscriber::fmt::init();

View File

@@ -3,8 +3,10 @@
// Won't be needed in user's code.
use tokio02_crate as tokio;
use lettre::transport::smtp::authentication::Credentials;
use lettre::{AsyncSmtpTransport, Message, Tokio02Connector, Tokio02Transport};
use lettre::{
transport::smtp::authentication::Credentials, AsyncSmtpTransport, Message, Tokio02Connector,
Tokio02Transport,
};
#[tokio::main]
async fn main() {

View File

@@ -3,8 +3,10 @@
// Won't be needed in user's code.
use tokio02_crate as tokio;
use lettre::transport::smtp::authentication::Credentials;
use lettre::{AsyncSmtpTransport, Message, Tokio02Connector, Tokio02Transport};
use lettre::{
transport::smtp::authentication::Credentials, AsyncSmtpTransport, Message, Tokio02Connector,
Tokio02Transport,
};
#[tokio::main]
async fn main() {

View File

@@ -1,9 +1,10 @@
use async_trait::async_trait;
use super::client::AsyncSmtpConnection;
#[cfg(feature = "tokio02")]
use super::Tls;
use super::{ClientId, Credentials, Error, Mechanism, Response, SmtpInfo};
use super::{
client::AsyncSmtpConnection, ClientId, Credentials, Error, Mechanism, Response, SmtpInfo,
};
use crate::{Envelope, Tokio02Transport};
#[allow(missing_debug_implementations)]

View File

@@ -1,8 +1,10 @@
use std::net::{Shutdown, SocketAddr};
use std::pin::Pin;
#[cfg(feature = "tokio02-rustls-tls")]
use std::sync::Arc;
use std::task::{Context, Poll};
use std::{
net::{Shutdown, SocketAddr},
pin::Pin,
task::{Context, Poll},
};
use futures_io::{Error as IoError, ErrorKind, Result as IoResult};
#[cfg(feature = "tokio02")]
@@ -159,8 +161,7 @@ impl AsyncNetworkStream {
#[cfg(feature = "tokio02-rustls-tls")]
return {
use tokio02_rustls::webpki::DNSNameRef;
use tokio02_rustls::TlsConnector;
use tokio02_rustls::{webpki::DNSNameRef, TlsConnector};
let domain = DNSNameRef::try_from_ascii_str(&domain)?;

View File

@@ -154,14 +154,15 @@
//! ```
//!
use std::time::Duration;
#[cfg(feature = "tokio02")]
pub use self::async_transport::{
AsyncSmtpConnector, AsyncSmtpTransport, AsyncSmtpTransportBuilder, Tokio02Connector,
};
pub(crate) use self::transport::SmtpClient;
pub use self::transport::{SmtpTransport, SmtpTransportBuilder};
pub use self::{
error::Error,
transport::{SmtpTransport, SmtpTransportBuilder},
};
#[cfg(any(feature = "native-tls", feature = "rustls-tls"))]
use crate::transport::smtp::client::TlsParameters;
use crate::transport::smtp::{
@@ -171,6 +172,7 @@ use crate::transport::smtp::{
response::Response,
};
use client::Tls;
use std::time::Duration;
#[cfg(feature = "tokio02")]
mod async_transport;