From f4f884730bdeb7fdcb84018ccb9df1febd0d5932 Mon Sep 17 00:00:00 2001 From: Alexis Mousset Date: Sat, 17 May 2014 12:20:01 +0200 Subject: [PATCH] Rust update: f.buf.write -> f.write --- src/client.rs | 2 +- src/smtp.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client.rs b/src/client.rs index 8ae8c68..4935197 100644 --- a/src/client.rs +++ b/src/client.rs @@ -37,7 +37,7 @@ struct SmtpServerInfo { impl Show for SmtpServerInfo{ fn fmt(&self, f: &mut Formatter) -> fmt::Result { - f.buf.write( + f.write( format!("{} with {}", self.name, match self.esmtp_features.clone() { diff --git a/src/smtp.rs b/src/smtp.rs index ec361bd..e98efa3 100644 --- a/src/smtp.rs +++ b/src/smtp.rs @@ -59,7 +59,7 @@ pub mod command { impl Show for SmtpCommand { fn fmt(&self, f: &mut Formatter) -> Result { - f.buf.write(match *self { + f.write(match *self { ExtendedHello(ref my_hostname) => format!("EHLO {}", my_hostname.clone()), Hello(ref my_hostname) => @@ -108,7 +108,7 @@ pub mod extension { impl Show for SmtpExtension { fn fmt(&self, f: &mut Formatter) -> Result { - f.buf.write( + f.write( match self { &EightBitMime => "8BITMIME".to_owned(), &Size(ref size) => format!("SIZE={}", size) @@ -167,7 +167,7 @@ pub mod response { impl Show for SmtpResponse { fn fmt(&self, f: &mut Formatter) -> Result { - f.buf.write( + f.write( match self.clone().message { Some(message) => format!("{} {}", self.code.to_str(), message), None => self.code.to_str() @@ -247,7 +247,7 @@ pub mod transaction_state { impl Show for TransactionState { fn fmt(&self, f: &mut Formatter) -> fmt::Result { - f.buf.write( + f.write( match *self { OutOfTransaction => "OutOfTransaction", HelloSent => "HelloSent",