diff --git a/src/transport/smtp/client/mod.rs b/src/transport/smtp/client/mod.rs index f3b7b0f..03e5074 100644 --- a/src/transport/smtp/client/mod.rs +++ b/src/transport/smtp/client/mod.rs @@ -79,7 +79,7 @@ fn escape_crlf(string: &str) -> String { /// Structure that implements the SMTP client #[derive(Default)] -pub struct InnerClient { +pub struct SmtpConnection { /// TCP stream between client and server /// Value is None before connection stream: Option>, @@ -91,16 +91,16 @@ macro_rules! return_err ( }) ); -impl InnerClient { +impl SmtpConnection { /// Creates a new SMTP client /// /// It does not connects to the server, but only creates the `Client` - pub fn new() -> InnerClient { - InnerClient { stream: None } + pub fn new() -> SmtpConnection { + SmtpConnection { stream: None } } } -impl InnerClient { +impl SmtpConnection { /// Closes the SMTP transaction if possible pub fn close(&mut self) { let _ = self.command(QuitCommand); diff --git a/src/transport/smtp/mod.rs b/src/transport/smtp/mod.rs index b6adfc2..0bf7a33 100644 --- a/src/transport/smtp/mod.rs +++ b/src/transport/smtp/mod.rs @@ -19,7 +19,7 @@ use crate::{ authentication::{ Credentials, Mechanism, DEFAULT_ENCRYPTED_MECHANISMS, DEFAULT_UNENCRYPTED_MECHANISMS, }, - client::{net::ClientTlsParameters, InnerClient}, + client::{net::ClientTlsParameters, SmtpConnection}, commands::*, error::{Error, SmtpResult}, extension::{ClientId, Extension, MailBodyParameter, MailParameter, ServerInfo}, @@ -258,7 +258,7 @@ pub struct SmtpTransport { /// Information about the client client_info: SmtpClient, /// Low level client - client: InnerClient, + client: SmtpConnection, } macro_rules! try_smtp ( @@ -281,7 +281,7 @@ impl<'a> SmtpTransport { /// /// It does not connect to the server, but only creates the `SmtpTransport` pub fn new(builder: SmtpClient) -> SmtpTransport { - let client = InnerClient::new(); + let client = SmtpConnection::new(); SmtpTransport { client,