Refactoring
This commit is contained in:
@@ -18,6 +18,7 @@ log = "0.3"
|
||||
rustc-serialize = "0.3"
|
||||
rust-crypto = "0.2"
|
||||
bufstream = "0.1"
|
||||
openssl = "0.6"
|
||||
email = "*"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
//! Provides authentication mecanisms
|
||||
|
||||
use std::fmt::{Display, Formatter};
|
||||
use std::fmt::Result as FmtResult;
|
||||
use std::fmt;
|
||||
|
||||
use serialize::base64::{self, ToBase64, FromBase64};
|
||||
use serialize::hex::ToHex;
|
||||
@@ -33,7 +33,7 @@ pub enum Mecanism {
|
||||
}
|
||||
|
||||
impl Display for Mecanism {
|
||||
fn fmt(&self, f: &mut Formatter) -> FmtResult {
|
||||
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
|
||||
write!(f, "{}",
|
||||
match *self {
|
||||
Mecanism::Plain => "PLAIN",
|
||||
|
||||
@@ -13,6 +13,8 @@ use std::io;
|
||||
use std::net::SocketAddr;
|
||||
use std::net::TcpStream;
|
||||
|
||||
use openssl::ssl::{SslContext, SslStream};
|
||||
|
||||
/// A trait for the concept of opening a stream
|
||||
pub trait Connector {
|
||||
/// Opens a connection to the given IP socket
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
use std::result::Result;
|
||||
use std::fmt::{Display, Formatter};
|
||||
use std::fmt::Result as FmtResult;
|
||||
use std::fmt;
|
||||
use std::collections::HashSet;
|
||||
|
||||
use response::Response;
|
||||
@@ -38,7 +38,7 @@ pub enum Extension {
|
||||
}
|
||||
|
||||
impl Display for Extension {
|
||||
fn fmt(&self, f: &mut Formatter) -> FmtResult {
|
||||
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
|
||||
write!(f, "{}",
|
||||
match *self {
|
||||
Extension::EightBitMime => "8BITMIME",
|
||||
@@ -64,7 +64,7 @@ pub struct ServerInfo {
|
||||
}
|
||||
|
||||
impl Display for ServerInfo {
|
||||
fn fmt(&self, f: &mut Formatter) -> FmtResult {
|
||||
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
|
||||
write!(f, "{} with {}",
|
||||
self.name,
|
||||
match self.esmtp_features.is_empty() {
|
||||
|
||||
@@ -147,6 +147,7 @@ extern crate time;
|
||||
extern crate uuid;
|
||||
extern crate email as email_format;
|
||||
extern crate bufstream;
|
||||
extern crate openssl;
|
||||
|
||||
mod extension;
|
||||
pub mod client;
|
||||
|
||||
Reference in New Issue
Block a user