Refactoring

This commit is contained in:
Alexis Mousset
2015-07-14 22:49:47 +02:00
parent e30e96c1ca
commit df8c8a18a8
5 changed files with 9 additions and 5 deletions

View File

@@ -18,6 +18,7 @@ log = "0.3"
rustc-serialize = "0.3"
rust-crypto = "0.2"
bufstream = "0.1"
openssl = "0.6"
email = "*"
[dev-dependencies]

View File

@@ -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",

View File

@@ -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

View File

@@ -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() {

View File

@@ -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;