Skip to content

Commit 3a01ffb

Browse files
committed
Upgrade for upstream changes
1 parent 7849a58 commit 3a01ffb

3 files changed

Lines changed: 28 additions & 28 deletions

File tree

src/error.rs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -382,23 +382,23 @@ pub enum PostgresConnectError {
382382
impl fmt::Show for PostgresConnectError {
383383
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
384384
match *self {
385-
InvalidUrl(ref err) => write!(fmt.buf, "Invalid URL: {}", err),
386-
MissingUser => fmt.buf.write_str("User missing in URL"),
385+
InvalidUrl(ref err) => write!(fmt, "Invalid URL: {}", err),
386+
MissingUser => write!(fmt, "User missing in URL"),
387387
SocketError(ref err) =>
388-
write!(fmt.buf, "Unable to open connection to server: {}", err),
388+
write!(fmt, "Unable to open connection to server: {}", err),
389389
PgConnectDbError(ref err) => err.fmt(fmt),
390390
MissingPassword =>
391-
fmt.buf.write_str("The server requested a password but none \
392-
was provided"),
391+
write!(fmt, "The server requested a password but none was \
392+
provided"),
393393
UnsupportedAuthentication =>
394-
fmt.buf.write_str("The server requested an unsupporeted \
395-
authentication method"),
394+
write!(fmt, "The server requested an unsupported \
395+
authentication method"),
396396
NoSslSupport =>
397-
fmt.buf.write_str("The server does not support SSL"),
397+
write!(fmt, "The server does not support SSL"),
398398
SslError(ref err) =>
399-
write!(fmt.buf, "Error initiating SSL session: {}", err),
399+
write!(fmt, "Error initiating SSL session: {}", err),
400400
PgConnectStreamError(ref err) =>
401-
write!(fmt.buf, "Error communicating with server: {}", err),
401+
write!(fmt, "Error communicating with server: {}", err),
402402
}
403403
}
404404
}
@@ -506,7 +506,7 @@ impl PostgresDbError {
506506

507507
impl fmt::Show for PostgresDbError {
508508
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
509-
write!(fmt.buf, "{}: {}", self.severity, self.message)
509+
write!(fmt, "{}: {}", self.severity, self.message)
510510
}
511511
}
512512

@@ -542,18 +542,18 @@ impl fmt::Show for PostgresError {
542542
match *self {
543543
PgDbError(ref err) => err.fmt(fmt),
544544
PgStreamError(ref err) => err.fmt(fmt),
545-
PgStreamDesynchronized => fmt.buf.write_str(
546-
"Communication with the server has desynchronized due to an \
547-
earlier IO error"),
548-
PgWrongConnection => fmt.buf.write_str(
549-
"A statement was executed with a connection it was not \
550-
prepared with"),
545+
PgStreamDesynchronized =>
546+
write!(fmt, "Communication with the server has desynchronized \
547+
due to an earlier IO error"),
548+
PgWrongConnection =>
549+
write!(fmt, "A statement was executed with a connection it was \
550+
not prepared with"),
551551
PgWrongParamCount { expected, actual } =>
552-
write!(fmt.buf, "Expected {} parameters but got {}", expected,
552+
write!(fmt, "Expected {} parameters but got {}", expected,
553553
actual),
554-
PgWrongType(ref ty) => write!(fmt.buf, "Unexpected type {}", ty),
555-
PgInvalidColumn => fmt.buf.write_str("Invalid column"),
556-
PgWasNull => fmt.buf.write_str("The value was NULL")
554+
PgWrongType(ref ty) => write!(fmt, "Unexpected type {}", ty),
555+
PgInvalidColumn => write!(fmt, "Invalid column"),
556+
PgWasNull => write!(fmt, "The value was NULL"),
557557
}
558558
}
559559
}

src/types/range.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,10 @@ impl<S: BoundSided, T: fmt::Show> fmt::Show for RangeBound<S, T> {
192192

193193
match BoundSided::side(None::<S>) {
194194
Lower => {
195-
write!(fmt.buf, "{}{}", chars[0], self.value)
195+
write!(fmt, "{}{}", chars[0], self.value)
196196
}
197197
Upper => {
198-
write!(fmt.buf, "{}{}", self.value, chars[1])
198+
write!(fmt, "{}{}", self.value, chars[1])
199199
}
200200
}
201201
}
@@ -270,16 +270,16 @@ enum InnerRange<T> {
270270
impl<T: fmt::Show> fmt::Show for Range<T> {
271271
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
272272
match self.inner {
273-
Empty => fmt.buf.write_str("empty"),
273+
Empty => write!(fmt, "empty"),
274274
Normal(ref lower, ref upper) => {
275275
match *lower {
276276
Some(ref bound) => try!(bound.fmt(fmt)),
277-
None => try!(fmt.buf.write_char('(')),
277+
None => try!(write!(fmt, "(")),
278278
}
279-
try!(fmt.buf.write_char(','));
279+
try!(write!(fmt, ","));
280280
match *upper {
281281
Some(ref bound) => bound.fmt(fmt),
282-
None => fmt.buf.write_char(')'),
282+
None => write!(fmt, ")"),
283283
}
284284
}
285285
}

submodules/rust-phf

Submodule rust-phf updated from dd6289b to 2e49a80

0 commit comments

Comments
 (0)