Skip to content

Commit cea1578

Browse files
committed
PostgresResult -> Result
1 parent b939526 commit cea1578

3 files changed

Lines changed: 106 additions & 103 deletions

File tree

src/error.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
use std::collections::HashMap;
44
use std::io;
55
use std::fmt;
6+
use std::result;
67

78
use openssl::ssl::error;
89
use phf;
910

10-
use PostgresResult;
11+
use Result;
1112
use types::PostgresType;
1213

1314
macro_rules! make_errors(
@@ -477,7 +478,7 @@ pub struct PostgresDbError {
477478

478479
impl PostgresDbError {
479480
#[doc(hidden)]
480-
pub fn new_raw(fields: Vec<(u8, String)>) -> Result<PostgresDbError, ()> {
481+
pub fn new_raw(fields: Vec<(u8, String)>) -> result::Result<PostgresDbError, ()> {
481482
let mut map: HashMap<_, _> = fields.into_iter().collect();
482483
Ok(PostgresDbError {
483484
severity: try!(map.pop(&b'S').ok_or(())),
@@ -508,15 +509,15 @@ impl PostgresDbError {
508509
}
509510

510511
#[doc(hidden)]
511-
pub fn new_connect<T>(fields: Vec<(u8, String)>) -> Result<T, PostgresConnectError> {
512+
pub fn new_connect<T>(fields: Vec<(u8, String)>) -> result::Result<T, PostgresConnectError> {
512513
match PostgresDbError::new_raw(fields) {
513514
Ok(err) => Err(PgConnectDbError(err)),
514515
Err(()) => Err(PgConnectBadResponse),
515516
}
516517
}
517518

518519
#[doc(hidden)]
519-
pub fn new<T>(fields: Vec<(u8, String)>) -> PostgresResult<T> {
520+
pub fn new<T>(fields: Vec<(u8, String)>) -> Result<T> {
520521
match PostgresDbError::new_raw(fields) {
521522
Ok(err) => Err(PgDbError(err)),
522523
Err(()) => Err(PgBadData),

0 commit comments

Comments
 (0)