Skip to content

Commit dd9c712

Browse files
committed
Fix for upstream changes
1 parent d7cec2c commit dd9c712

4 files changed

Lines changed: 19 additions & 19 deletions

File tree

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ extern crate phf_mac;
6767
extern crate log;
6868

6969
use url::Url;
70-
use openssl::crypto::hash::{MD5, Hasher};
70+
use openssl::crypto::hash::{HashType, Hasher};
7171
use openssl::ssl::SslContext;
7272
use serialize::hex::ToHex;
7373
use std::cell::{Cell, RefCell};
@@ -443,11 +443,11 @@ impl InnerConnection {
443443
}
444444
AuthenticationMD5Password { salt } => {
445445
let pass = try!(user.password.ok_or(ConnectError::MissingPassword));
446-
let mut hasher = Hasher::new(MD5);
446+
let mut hasher = Hasher::new(HashType::MD5);
447447
hasher.update(pass.as_bytes());
448448
hasher.update(user.user.as_bytes());
449449
let output = hasher.finalize()[].to_hex();
450-
let mut hasher = Hasher::new(MD5);
450+
let mut hasher = Hasher::new(HashType::MD5);
451451
hasher.update(output.as_bytes());
452452
hasher.update(&salt);
453453
let output = format!("md5{}", hasher.finalize()[].to_hex());
@@ -1560,7 +1560,7 @@ impl<'a> CopyInStatement<'a> {
15601560
///
15611561
/// Returns the number of rows copied.
15621562
pub fn execute<'b, I, J>(&self, mut rows: I) -> Result<uint>
1563-
where I: Iterator<J>, J: Iterator<&'b ToSql + 'b> {
1563+
where I: Iterator<J>, J: Iterator<&'b (ToSql + 'b)> {
15641564
let mut conn = self.conn.conn.borrow_mut();
15651565

15661566
try!(conn.write_messages(&[

src/types/range.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,50 +49,50 @@ macro_rules! range(
4949
('(', $h:expr ')') => (
5050
::postgres::types::range::Range::new(None,
5151
Some(::postgres::types::range::RangeBound::new($h,
52-
::postgres::types::range::Exclusive)))
52+
::postgres::types::range::BoundType::Exclusive)))
5353
);
5454
('(', $h:expr ']') => (
5555
::postgres::types::range::Range::new(None,
5656
Some(::postgres::types::range::RangeBound::new($h,
57-
::postgres::types::range::Inclusive)))
57+
::postgres::types::range::BoundType::Inclusive)))
5858
);
5959
('(' $l:expr, ')') => (
6060
::postgres::types::range::Range::new(
6161
Some(::postgres::types::range::RangeBound::new($l,
62-
::postgres::types::range::Exclusive)), None)
62+
::postgres::types::range::BoundType::Exclusive)), None)
6363
);
6464
('[' $l:expr, ')') => (
6565
::postgres::types::range::Range::new(
6666
Some(::postgres::types::range::RangeBound::new($l,
67-
::postgres::types::range::Inclusive)), None)
67+
::postgres::types::range::BoundType::Inclusive)), None)
6868
);
6969
('(' $l:expr, $h:expr ')') => (
7070
::postgres::types::range::Range::new(
7171
Some(::postgres::types::range::RangeBound::new($l,
72-
::postgres::types::range::Exclusive)),
72+
::postgres::types::range::BoundType::Exclusive)),
7373
Some(::postgres::types::range::RangeBound::new($h,
74-
::postgres::types::range::Exclusive)))
74+
::postgres::types::range::BoundType::Exclusive)))
7575
);
7676
('(' $l:expr, $h:expr ']') => (
7777
::postgres::types::range::Range::new(
7878
Some(::postgres::types::range::RangeBound::new($l,
79-
::postgres::types::range::Exclusive)),
79+
::postgres::types::range::BoundType::Exclusive)),
8080
Some(::postgres::types::range::RangeBound::new($h,
81-
::postgres::types::range::Inclusive)))
81+
::postgres::types::range::BoundType::Inclusive)))
8282
);
8383
('[' $l:expr, $h:expr ')') => (
8484
::postgres::types::range::Range::new(
8585
Some(::postgres::types::range::RangeBound::new($l,
86-
::postgres::types::range::Inclusive)),
86+
::postgres::types::range::BoundType::Inclusive)),
8787
Some(::postgres::types::range::RangeBound::new($h,
88-
::postgres::types::range::Exclusive)))
88+
::postgres::types::range::BoundType::Exclusive)))
8989
);
9090
('[' $l:expr, $h:expr ']') => (
9191
::postgres::types::range::Range::new(
9292
Some(::postgres::types::range::RangeBound::new($l,
93-
::postgres::types::range::Inclusive)),
93+
::postgres::types::range::BoundType::Inclusive)),
9494
Some(::postgres::types::range::RangeBound::new($h,
95-
::postgres::types::range::Inclusive)))
95+
::postgres::types::range::BoundType::Inclusive)))
9696
)
9797
)
9898

tests/test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ extern crate serialize;
66
extern crate url;
77
extern crate openssl;
88

9-
use openssl::ssl::{SslContext, Sslv3};
9+
use openssl::ssl::SslContext;
10+
use openssl::ssl::SslMethod::Sslv3;
1011
use std::io::timer;
1112
use std::time::Duration;
1213

tests/types/range.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ use std::i32;
22

33
use postgres::types::range::{RangeBound,
44
Range,
5-
Inclusive,
6-
Exclusive,
75
UpperBound,
86
LowerBound,
97
Normalizable,
108
BoundType};
9+
use postgres::types::range::BoundType::{Inclusive, Exclusive};
1110

1211
#[test]
1312
fn test_range_bound_lower_lt() {

0 commit comments

Comments
 (0)