diff --git a/src/error.rs b/src/error.rs index e7b9726e..d0f66b1b 100644 --- a/src/error.rs +++ b/src/error.rs @@ -382,23 +382,23 @@ pub enum PostgresConnectError { impl fmt::Show for PostgresConnectError { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { match *self { - InvalidUrl(ref err) => write!(fmt.buf, "Invalid URL: {}", err), - MissingUser => fmt.buf.write_str("User missing in URL"), + InvalidUrl(ref err) => write!(fmt, "Invalid URL: {}", err), + MissingUser => write!(fmt, "User missing in URL"), SocketError(ref err) => - write!(fmt.buf, "Unable to open connection to server: {}", err), + write!(fmt, "Unable to open connection to server: {}", err), PgConnectDbError(ref err) => err.fmt(fmt), MissingPassword => - fmt.buf.write_str("The server requested a password but none \ - was provided"), + write!(fmt, "The server requested a password but none was \ + provided"), UnsupportedAuthentication => - fmt.buf.write_str("The server requested an unsupporeted \ - authentication method"), + write!(fmt, "The server requested an unsupported \ + authentication method"), NoSslSupport => - fmt.buf.write_str("The server does not support SSL"), + write!(fmt, "The server does not support SSL"), SslError(ref err) => - write!(fmt.buf, "Error initiating SSL session: {}", err), + write!(fmt, "Error initiating SSL session: {}", err), PgConnectStreamError(ref err) => - write!(fmt.buf, "Error communicating with server: {}", err), + write!(fmt, "Error communicating with server: {}", err), } } } @@ -506,7 +506,7 @@ impl PostgresDbError { impl fmt::Show for PostgresDbError { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - write!(fmt.buf, "{}: {}", self.severity, self.message) + write!(fmt, "{}: {}", self.severity, self.message) } } @@ -542,18 +542,18 @@ impl fmt::Show for PostgresError { match *self { PgDbError(ref err) => err.fmt(fmt), PgStreamError(ref err) => err.fmt(fmt), - PgStreamDesynchronized => fmt.buf.write_str( - "Communication with the server has desynchronized due to an \ - earlier IO error"), - PgWrongConnection => fmt.buf.write_str( - "A statement was executed with a connection it was not \ - prepared with"), + PgStreamDesynchronized => + write!(fmt, "Communication with the server has desynchronized \ + due to an earlier IO error"), + PgWrongConnection => + write!(fmt, "A statement was executed with a connection it was \ + not prepared with"), PgWrongParamCount { expected, actual } => - write!(fmt.buf, "Expected {} parameters but got {}", expected, + write!(fmt, "Expected {} parameters but got {}", expected, actual), - PgWrongType(ref ty) => write!(fmt.buf, "Unexpected type {}", ty), - PgInvalidColumn => fmt.buf.write_str("Invalid column"), - PgWasNull => fmt.buf.write_str("The value was NULL") + PgWrongType(ref ty) => write!(fmt, "Unexpected type {}", ty), + PgInvalidColumn => write!(fmt, "Invalid column"), + PgWasNull => write!(fmt, "The value was NULL"), } } } diff --git a/src/types/range.rs b/src/types/range.rs index a363a044..a45125a3 100644 --- a/src/types/range.rs +++ b/src/types/range.rs @@ -192,10 +192,10 @@ impl fmt::Show for RangeBound { match BoundSided::side(None::) { Lower => { - write!(fmt.buf, "{}{}", chars[0], self.value) + write!(fmt, "{}{}", chars[0], self.value) } Upper => { - write!(fmt.buf, "{}{}", self.value, chars[1]) + write!(fmt, "{}{}", self.value, chars[1]) } } } @@ -270,16 +270,16 @@ enum InnerRange { impl fmt::Show for Range { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { match self.inner { - Empty => fmt.buf.write_str("empty"), + Empty => write!(fmt, "empty"), Normal(ref lower, ref upper) => { match *lower { Some(ref bound) => try!(bound.fmt(fmt)), - None => try!(fmt.buf.write_char('(')), + None => try!(write!(fmt, "(")), } - try!(fmt.buf.write_char(',')); + try!(write!(fmt, ",")); match *upper { Some(ref bound) => bound.fmt(fmt), - None => fmt.buf.write_char(')'), + None => write!(fmt, ")"), } } } diff --git a/submodules/rust-phf b/submodules/rust-phf index dd6289bb..2e49a802 160000 --- a/submodules/rust-phf +++ b/submodules/rust-phf @@ -1 +1 @@ -Subproject commit dd6289bbdaae6385063d7b967df53076cfef320d +Subproject commit 2e49a8024cf7206638c0f56ed29871db9357bd12