Skip to content

Commit 453cd07

Browse files
committed
Merge branch 'release-v0.11.9' into release
2 parents b437f9a + 700625c commit 453cd07

File tree

9 files changed

+22
-18
lines changed

9 files changed

+22
-18
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
22
name = "postgres"
3-
version = "0.11.8"
3+
version = "0.11.9"
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.11.8/postgres"
8+
documentation = "https://sfackler.github.io/rust-postgres/doc/v0.11.9/postgres"
99
readme = "README.md"
1010
keywords = ["database", "postgres", "postgresql", "sql"]
1111
include = ["src/*", "Cargo.toml", "LICENSE", "README.md", "THIRD_PARTY"]

README.md

Lines changed: 5 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.11.8/postgres)
4+
[Documentation](https://sfackler.github.io/rust-postgres/doc/v0.11.9/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

@@ -22,13 +22,11 @@ use postgres::{Connection, SslMode};
2222
struct Person {
2323
id: i32,
2424
name: String,
25-
data: Option<Vec<u8>>
25+
data: Option<Vec<u8>>,
2626
}
2727

2828
fn main() {
29-
let conn = Connection::connect("postgres://postgres@localhost", SslMode::None)
30-
.unwrap();
31-
29+
let conn = Connection::connect("postgres://postgres@localhost", SslMode::None).unwrap();
3230
conn.execute("CREATE TABLE person (
3331
id SERIAL PRIMARY KEY,
3432
name VARCHAR NOT NULL,
@@ -37,16 +35,15 @@ fn main() {
3735
let me = Person {
3836
id: 0,
3937
name: "Steven".to_string(),
40-
data: None
38+
data: None,
4139
};
4240
conn.execute("INSERT INTO person (name, data) VALUES ($1, $2)",
4341
&[&me.name, &me.data]).unwrap();
44-
4542
for row in &conn.query("SELECT id, name, data FROM person", &[]).unwrap() {
4643
let person = Person {
4744
id: row.get(0),
4845
name: row.get(1),
49-
data: row.get(2)
46+
data: row.get(2),
5047
};
5148
println!("Found person {}", person.name);
5249
}

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
//! }
3939
//! }
4040
//! ```
41-
#![doc(html_root_url="https://sfackler.github.io/rust-postgres/doc/v0.11.8")]
41+
#![doc(html_root_url="https://sfackler.github.io/rust-postgres/doc/v0.11.9")]
4242
#![warn(missing_docs)]
4343
#![allow(unknown_lints, needless_lifetimes)] // for clippy
4444
#![cfg_attr(all(unix, feature = "nightly"), feature(unix_socket))]

src/md5.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use std::io::prelude::*;
1211
use std::ptr;
1312
use std::mem;
1413
use std::ops::{Add, Range};
@@ -277,7 +276,7 @@ struct Md5State {
277276
}
278277

279278
impl Md5State {
280-
#[allow(new_without_default)]
279+
#[allow(new_without_default_derive)]
281280
fn new() -> Md5State {
282281
Md5State {
283282
s0: 0x67452301,

src/priv_io.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
use byteorder::ReadBytesExt;
2+
// this import needs to stay to support pre 1.9 users
3+
#[allow(unused_imports)]
24
use net2::TcpStreamExt;
35
use std::error::Error;
46
use std::io;
@@ -18,7 +20,7 @@ use std::os::windows::io::{AsRawSocket, RawSocket};
1820

1921
use {SslMode, ConnectParams, ConnectTarget};
2022
use error::ConnectError;
21-
use io::{NegotiateSsl, StreamWrapper};
23+
use io::StreamWrapper;
2224
use message::{self, WriteMessage};
2325
use message::Frontend;
2426

src/rows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::fmt;
77
use std::ops::Deref;
88
use std::slice;
99

10-
use {Result, Transaction, DbErrorNew, SessionInfoNew, RowsNew, LazyRowsNew, StatementInternals,
10+
use {Result, Transaction, SessionInfoNew, RowsNew, LazyRowsNew, StatementInternals,
1111
WrongTypeNew};
1212
use types::{FromSql, SessionInfo, WrongType};
1313
use stmt::{Statement, Column};

src/transaction.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ impl ConfigInternals for Config {
8888
}
8989

9090
if let Some(read_only) = self.read_only {
91-
if first {
91+
if !first {
9292
s.push(',');
9393
}
9494
if read_only {
@@ -100,7 +100,7 @@ impl ConfigInternals for Config {
100100
}
101101

102102
if let Some(deferrable) = self.deferrable {
103-
if first {
103+
if !first {
104104
s.push(',');
105105
}
106106
if deferrable {

src/url.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
10-
use std::io::prelude::*;
1110
use std::str::FromStr;
1211
use hex::FromHex;
1312

tests/test.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,13 @@ fn transaction_config() {
10391039
conn.set_transaction_config(&config).unwrap();
10401040
}
10411041

1042+
#[test]
1043+
fn transaction_config_one_setting() {
1044+
let conn = Connection::connect("postgres://postgres@localhost", SslMode::None).unwrap();
1045+
conn.set_transaction_config(&transaction::Config::new().read_only(true)).unwrap();
1046+
conn.set_transaction_config(&transaction::Config::new().deferrable(true)).unwrap();
1047+
}
1048+
10421049
#[test]
10431050
fn transaction_with() {
10441051
let conn = Connection::connect("postgres://postgres@localhost", SslMode::None).unwrap();

0 commit comments

Comments
 (0)