Skip to content

Commit a402f7d

Browse files
committed
Merge branch 'release-v0.10.2' into release
2 parents 321cc4d + 3622a2e commit a402f7d

23 files changed

+923
-832
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.

.travis/update_docs.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
22
name = "postgres"
3-
version = "0.10.1"
3+
version = "0.10.2"
44
authors = ["Steven Fackler <[email protected]>"]
55
license = "MIT"
66
description = "A native PostgreSQL driver"
77
repository = "https://github.com/sfackler/rust-postgres"
8-
documentation = "https://sfackler.github.io/rust-postgres/doc/v0.10.1/postgres"
8+
documentation = "https://sfackler.github.io/rust-postgres/doc/v0.10.2/postgres"
99
readme = "README.md"
1010
keywords = ["database", "sql"]
1111
build = "build.rs"
@@ -31,7 +31,7 @@ phf = "0.7"
3131
rustc-serialize = "0.3"
3232
net2 = { version = "0.2", features = ["nightly"] }
3333
chrono = { version = "0.2.14", optional = true }
34-
openssl = { version = "0.6.4", optional = true }
34+
openssl = { version = ">= 0.6.4, < 0.8", optional = true }
3535
serde = { version = "0.3", optional = true } # Delete for 0.11
3636
serde_json = { version = "0.6", optional = true }
3737
time = { version = "0.1.14", optional = true }

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Rust-Postgres
22
A native PostgreSQL driver for Rust.
33

4-
[Documentation](https://sfackler.github.io/rust-postgres/doc/v0.10.1/postgres)
4+
[Documentation](https://sfackler.github.io/rust-postgres/doc/v0.10.2/postgres)
55

66
[![Build Status](https://travis-ci.org/sfackler/rust-postgres.png?branch=master)](https://travis-ci.org/sfackler/rust-postgres) [![Latest Version](https://img.shields.io/crates/v/postgres.svg)](https://crates.io/crates/postgres)
77

@@ -198,16 +198,16 @@ types. The driver currently supports the following conversions:
198198
</tr>
199199
<tr>
200200
<td>
201-
<a href="https://github.com/rust-lang/rustc-serialize">serialize::json::Json</a>
201+
<a href="https://github.com/rust-lang-nursery/rustc-serialize">serialize::json::Json</a>
202202
and
203-
<a href="https://github.com/erickt/serde_json">serde_json::Value</a>
203+
<a href="https://github.com/serde-rs/json">serde_json::Value</a>
204204
(<a href="#optional-features">optional</a>)
205205
</td>
206206
<td>JSON, JSONB</td>
207207
</tr>
208208
<tr>
209209
<td>
210-
<a href="https://github.com/rust-lang/time">time::Timespec</a>
210+
<a href="https://github.com/rust-lang-deprecated/time">time::Timespec</a>
211211
and
212212
<a href="https://github.com/lifthrasiir/rust-chrono">chrono::NaiveDateTime</a>
213213
(<a href="#optional-features">optional</a>)
@@ -216,7 +216,7 @@ types. The driver currently supports the following conversions:
216216
</tr>
217217
<tr>
218218
<td>
219-
<a href="https://github.com/rust-lang/time">time::Timespec</a>,
219+
<a href="https://github.com/rust-lang-deprecated/time">time::Timespec</a>,
220220
<a href="https://github.com/lifthrasiir/rust-chrono">chrono::DateTime&lt;UTC&gt;</a>,
221221
<a href="https://github.com/lifthrasiir/rust-chrono">chrono::DateTime&lt;Local&gt;</a>,
222222
and
@@ -241,7 +241,7 @@ types. The driver currently supports the following conversions:
241241
</tr>
242242
<tr>
243243
<td>
244-
<a href="https://github.com/rust-lang/uuid">uuid::Uuid</a>
244+
<a href="https://github.com/rust-lang-nursery/uuid">uuid::Uuid</a>
245245
(<a href="#optional-features">optional</a>)
246246
</td>
247247
<td>UUID</td>
@@ -284,8 +284,9 @@ implementations for `uuid`'s `Uuid` type.
284284
[JSON and JSONB](http://www.postgresql.org/docs/9.4/static/datatype-json.html)
285285
support is provided optionally by the `rustc-serialize` feature, which adds
286286
`ToSql` and `FromSql` implementations for `rustc-serialize`'s `Json` type, and
287-
the `serde` feature, which adds implementations for `serde_json`'s `Value`
288-
type.
287+
the `serde_json` feature, which adds implementations for `serde_json`'s `Value`
288+
type. The `serde` feature provides implementations for the older
289+
`serde::json::Value` type.
289290

290291
### TIMESTAMP/TIMESTAMPTZ/DATE/TIME types
291292

src/error.rs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ impl DbErrorNew for DbError {
4848
None => match map.remove(&b'p') {
4949
Some(pos) => Some(ErrorPosition::Internal {
5050
position: try!(pos.parse().map_err(|_| ())),
51-
query: try!(map.remove(&b'q').ok_or(()))
51+
query: try!(map.remove(&b'q').ok_or(())),
5252
}),
53-
None => None
54-
}
53+
None => None,
54+
},
5555
},
5656
where_: map.remove(&b'W'),
5757
schema: map.remove(&b's'),
@@ -194,7 +194,7 @@ impl error::Error for DbError {
194194
#[derive(Debug)]
195195
pub enum ConnectError {
196196
/// An error creating `ConnectParams`.
197-
BadConnectParams(Box<error::Error+Sync+Send>),
197+
BadConnectParams(Box<error::Error + Sync + Send>),
198198
/// The `ConnectParams` was missing a user.
199199
MissingUser,
200200
/// An error from the Postgres server itself.
@@ -207,7 +207,7 @@ pub enum ConnectError {
207207
/// The Postgres server does not support SSL encryption.
208208
NoSslSupport,
209209
/// An error initializing the SSL session.
210-
SslError(Box<error::Error+Sync+Send>),
210+
SslError(Box<error::Error + Sync + Send>),
211211
/// An error communicating with the server.
212212
IoError(io::Error),
213213
}
@@ -220,7 +220,7 @@ impl fmt::Display for ConnectError {
220220
ConnectError::DbError(ref err) => write!(fmt, ": {}", err),
221221
ConnectError::SslError(ref err) => write!(fmt, ": {}", err),
222222
ConnectError::IoError(ref err) => write!(fmt, ": {}", err),
223-
_ => Ok(())
223+
_ => Ok(()),
224224
}
225225
}
226226
}
@@ -231,7 +231,8 @@ impl error::Error for ConnectError {
231231
ConnectError::BadConnectParams(_) => "Error creating `ConnectParams`",
232232
ConnectError::MissingUser => "User missing in `ConnectParams`",
233233
ConnectError::DbError(_) => "Error reported by Postgres",
234-
ConnectError::MissingPassword => "The server requested a password but none was provided",
234+
ConnectError::MissingPassword =>
235+
"The server requested a password but none was provided",
235236
ConnectError::UnsupportedAuthentication => {
236237
"The server requested an unsupported authentication method"
237238
}
@@ -247,7 +248,7 @@ impl error::Error for ConnectError {
247248
ConnectError::DbError(ref err) => Some(&**err),
248249
ConnectError::SslError(ref err) => Some(&**err),
249250
ConnectError::IoError(ref err) => Some(err),
250-
_ => None
251+
_ => None,
251252
}
252253
}
253254
}
@@ -280,8 +281,8 @@ pub enum ErrorPosition {
280281
/// The byte position.
281282
position: u32,
282283
/// A query generated by the Postgres server.
283-
query: String
284-
}
284+
query: String,
285+
},
285286
}
286287

287288
/// An error encountered when communicating with the Postgres server.
@@ -297,7 +298,7 @@ pub enum Error {
297298
/// An attempt was made to read from a column that does not exist.
298299
InvalidColumn,
299300
/// An error converting between Postgres and Rust types.
300-
Conversion(Box<error::Error+Sync+Send>),
301+
Conversion(Box<error::Error + Sync + Send>),
301302
}
302303

303304
impl fmt::Display for Error {
@@ -329,7 +330,7 @@ impl error::Error for Error {
329330
Error::DbError(ref err) => Some(&**err),
330331
Error::IoError(ref err) => Some(err),
331332
Error::Conversion(ref err) => Some(&**err),
332-
_ => None
333+
_ => None,
333334
}
334335
}
335336
}

src/io/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ pub trait NegotiateSsl {
2626
///
2727
/// The host portion of the connection parameters is provided for hostname
2828
/// verification.
29-
fn negotiate_ssl(&self, host: &str, stream: Stream)
30-
-> Result<Box<StreamWrapper>, Box<Error+Sync+Send>>;
29+
fn negotiate_ssl(&self,
30+
host: &str,
31+
stream: Stream)
32+
-> Result<Box<StreamWrapper>, Box<Error + Sync + Send>>;
3133
}

src/io/openssl.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ impl StreamWrapper for SslStream<Stream> {
1616
}
1717

1818
impl NegotiateSsl for SslContext {
19-
fn negotiate_ssl(&self, _: &str, stream: Stream)
20-
-> Result<Box<StreamWrapper>, Box<Error+Send+Sync>> {
19+
fn negotiate_ssl(&self,
20+
_: &str,
21+
stream: Stream)
22+
-> Result<Box<StreamWrapper>, Box<Error + Send + Sync>> {
2123
let stream = try!(SslStream::connect(self, stream));
2224
Ok(Box::new(stream))
2325
}

0 commit comments

Comments
 (0)