Skip to content

Commit 09cb2fd

Browse files
committed
PostgresUserInfo -> UserInfo
1 parent 873a006 commit 09cb2fd

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ extern crate phf_mac;
6565
extern crate log;
6666

6767
use collections::{Deque, RingBuf};
68-
use url::{UserInfo, Url};
68+
use url::Url;
6969
use openssl::crypto::hash::{MD5, Hasher};
7070
use openssl::ssl::SslContext;
7171
use serialize::hex::ToHex;
@@ -164,7 +164,7 @@ pub enum ConnectTarget {
164164

165165
/// Authentication information
166166
#[deriving(Clone)]
167-
pub struct PostgresUserInfo {
167+
pub struct UserInfo {
168168
/// The username
169169
pub user: String,
170170
/// An optional password
@@ -184,7 +184,7 @@ pub struct PostgresConnectParams {
184184
///
185185
/// `PostgresConnection::connect` requires a user but `cancel_query` does
186186
/// not.
187-
pub user: Option<PostgresUserInfo>,
187+
pub user: Option<UserInfo>,
188188
/// The database to connect to. Defaults the value of `user`.
189189
pub database: Option<String>,
190190
/// Runtime parameters to be passed to the Postgres backend.
@@ -231,7 +231,7 @@ impl IntoConnectParams for Url {
231231
};
232232

233233
let user = match user {
234-
Some(UserInfo { user, pass }) => Some(PostgresUserInfo { user: user, password: pass }),
234+
Some(url::UserInfo { user, pass }) => Some(UserInfo { user: user, password: pass }),
235235
None => None,
236236
};
237237

@@ -462,7 +462,7 @@ impl InnerPostgresConnection {
462462
}
463463
}
464464

465-
fn handle_auth(&mut self, user: PostgresUserInfo) -> result::Result<(), PostgresConnectError> {
465+
fn handle_auth(&mut self, user: UserInfo) -> result::Result<(), PostgresConnectError> {
466466
match try_pg_conn!(self.read_message()) {
467467
AuthenticationOk => return Ok(()),
468468
AuthenticationCleartextPassword => {
@@ -746,13 +746,13 @@ impl PostgresConnection {
746746
/// ```
747747
///
748748
/// ```rust,no_run
749-
/// # use postgres::{PostgresConnection, PostgresUserInfo, PostgresConnectParams, NoSsl, TargetUnix};
749+
/// # use postgres::{PostgresConnection, UserInfo, PostgresConnectParams, NoSsl, TargetUnix};
750750
/// # let _ = || {
751751
/// # let some_crazy_path = Path::new("");
752752
/// let params = PostgresConnectParams {
753753
/// target: TargetUnix(some_crazy_path),
754754
/// port: None,
755-
/// user: Some(PostgresUserInfo {
755+
/// user: Some(UserInfo {
756756
/// user: "postgres".into_string(),
757757
/// password: None
758758
/// }),

0 commit comments

Comments
 (0)