Skip to content

Commit 215c16b

Browse files
committed
Revert "Don't talk about TlsMode until we actually cut 0.12"
This reverts commit 7322308.
1 parent 243ee55 commit 215c16b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Rust-Postgres is a pure-Rust frontend for the popular PostgreSQL database.
1717
```rust
1818
extern crate postgres;
1919

20-
use postgres::{Connection, SslMode};
20+
use postgres::{Connection, TlsMode};
2121

2222
struct Person {
2323
id: i32,
@@ -26,7 +26,7 @@ struct Person {
2626
}
2727

2828
fn main() {
29-
let conn = Connection::connect("postgres://postgres@localhost", SslMode::None).unwrap();
29+
let conn = Connection::connect("postgres://postgres@localhost", TlsMode::None).unwrap();
3030
conn.execute("CREATE TABLE person (
3131
id SERIAL PRIMARY KEY,
3232
name VARCHAR NOT NULL,
@@ -65,7 +65,7 @@ fn main() {
6565
Connect to a Postgres server using the standard URI format:
6666
```rust
6767
let conn = try!(Connection::connect("postgres://user:pass@host:port/database?arg1=val1&arg2=val2",
68-
SslMode::None));
68+
TlsMode::None));
6969
```
7070
`pass` may be omitted if not needed. `port` defaults to `5432` and `database`
7171
defaults to the value of `user` if not specified. The driver supports `trust`,
@@ -76,7 +76,7 @@ be set to the absolute path to the directory containing the socket file. Since
7676
`/` is a reserved character in URLs, the path should be URL encoded. If Postgres
7777
stored its socket files in `/run/postgres`, the connection would then look like:
7878
```rust
79-
let conn = try!(Connection::connect("postgres://postgres@%2Frun%2Fpostgres", SslMode::None));
79+
let conn = try!(Connection::connect("postgres://postgres@%2Frun%2Fpostgres", TlsMode::None));
8080
```
8181
Paths which contain non-UTF8 characters can be handled in a different manner;
8282
see the documentation for details.

0 commit comments

Comments
 (0)