Rust update: f.buf.write -> f.write

This commit is contained in:
Alexis Mousset
2014-05-17 12:20:01 +02:00
parent 24acc2d34c
commit f4f884730b
2 changed files with 5 additions and 5 deletions

View File

@@ -37,7 +37,7 @@ struct SmtpServerInfo<T> {
impl<T: Show> Show for SmtpServerInfo<T>{
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
f.buf.write(
f.write(
format!("{} with {}",
self.name,
match self.esmtp_features.clone() {

View File

@@ -59,7 +59,7 @@ pub mod command {
impl<T: Show + Str> Show for SmtpCommand<T> {
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<T: Show + Clone> Show for SmtpResponse<T> {
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",