Skip to content

Commit 30a3210

Browse files
committed
Revert "Strip prefixes from types"
This reverts commit ccdb02f. I'm not sure this is the right way to go just yet
1 parent ccdb02f commit 30a3210

8 files changed

Lines changed: 284 additions & 270 deletions

File tree

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ path = "tests/test.rs"
1414

1515
[dependencies.openssl]
1616
git = "https://github.com/sfackler/rust-openssl"
17-
rev = "182ec4a6e77a53381e8b5e161f5d9c8fb3d965ff"
17+
rev = "39343df472b4b0c99055d371f42beceeef527bd6"
1818

1919
[dependencies.phf]
2020
git = "https://github.com/sfackler/rust-phf"
21-
rev = "9fd8d24f59b1af976526fc43baf6635a3714c71e"
21+
rev = "b2220d9a428049fb9c52b51c16d8f6b15cd02487"
2222

2323
[dependencies.phf_mac]
2424
git = "https://github.com/sfackler/rust-phf"
25-
rev = "9fd8d24f59b1af976526fc43baf6635a3714c71e"
25+
rev = "b2220d9a428049fb9c52b51c16d8f6b15cd02487"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate time;
1515

1616
use time::Timespec;
1717

18-
use postgres::NoSsl;
18+
use postgres::{PostgresConnection, NoSsl};
1919
use postgres::types::ToSql;
2020

2121
struct Person {
@@ -26,8 +26,8 @@ struct Person {
2626
}
2727

2828
fn main() {
29-
let conn = postgres::Connection::connect("postgres://postgres@localhost",
30-
&NoSsl).unwrap();
29+
let conn = PostgresConnection::connect("postgres://postgres@localhost",
30+
&NoSsl).unwrap();
3131

3232
conn.execute("CREATE TABLE person (
3333
id SERIAL PRIMARY KEY,

src/io.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::io::net::tcp::TcpStream;
44
use std::io::net::unix::UnixStream;
55
use std::io::{Stream, IoResult};
66

7-
use {ConnectParams,
7+
use {PostgresConnectParams,
88
SslMode,
99
NoSsl,
1010
PreferSsl,
@@ -81,7 +81,8 @@ impl Writer for InternalStream {
8181
}
8282
}
8383

84-
fn open_socket(params: &ConnectParams) -> Result<InternalStream, PostgresConnectError> {
84+
fn open_socket(params: &PostgresConnectParams)
85+
-> Result<InternalStream, PostgresConnectError> {
8586
let port = params.port.unwrap_or(DEFAULT_PORT);
8687
let socket = match params.target {
8788
TargetTcp(ref host) =>
@@ -95,7 +96,7 @@ fn open_socket(params: &ConnectParams) -> Result<InternalStream, PostgresConnect
9596
socket.map_err(|e| SocketError(e))
9697
}
9798

98-
pub fn initialize_stream(params: &ConnectParams, ssl: &SslMode)
99+
pub fn initialize_stream(params: &PostgresConnectParams, ssl: &SslMode)
99100
-> Result<MaybeSslStream<InternalStream>, PostgresConnectError> {
100101
let mut socket = try!(open_socket(params));
101102

0 commit comments

Comments
 (0)