Fix for upstream changes
This commit is contained in:
parent
d7cec2c7e5
commit
dd9c712ea9
@ -67,7 +67,7 @@ extern crate phf_mac;
|
||||
extern crate log;
|
||||
|
||||
use url::Url;
|
||||
use openssl::crypto::hash::{MD5, Hasher};
|
||||
use openssl::crypto::hash::{HashType, Hasher};
|
||||
use openssl::ssl::SslContext;
|
||||
use serialize::hex::ToHex;
|
||||
use std::cell::{Cell, RefCell};
|
||||
@ -443,11 +443,11 @@ impl InnerConnection {
|
||||
}
|
||||
AuthenticationMD5Password { salt } => {
|
||||
let pass = try!(user.password.ok_or(ConnectError::MissingPassword));
|
||||
let mut hasher = Hasher::new(MD5);
|
||||
let mut hasher = Hasher::new(HashType::MD5);
|
||||
hasher.update(pass.as_bytes());
|
||||
hasher.update(user.user.as_bytes());
|
||||
let output = hasher.finalize()[].to_hex();
|
||||
let mut hasher = Hasher::new(MD5);
|
||||
let mut hasher = Hasher::new(HashType::MD5);
|
||||
hasher.update(output.as_bytes());
|
||||
hasher.update(&salt);
|
||||
let output = format!("md5{}", hasher.finalize()[].to_hex());
|
||||
@ -1560,7 +1560,7 @@ impl<'a> CopyInStatement<'a> {
|
||||
///
|
||||
/// Returns the number of rows copied.
|
||||
pub fn execute<'b, I, J>(&self, mut rows: I) -> Result<uint>
|
||||
where I: Iterator<J>, J: Iterator<&'b ToSql + 'b> {
|
||||
where I: Iterator<J>, J: Iterator<&'b (ToSql + 'b)> {
|
||||
let mut conn = self.conn.conn.borrow_mut();
|
||||
|
||||
try!(conn.write_messages(&[
|
||||
|
@ -49,50 +49,50 @@ macro_rules! range(
|
||||
('(', $h:expr ')') => (
|
||||
::postgres::types::range::Range::new(None,
|
||||
Some(::postgres::types::range::RangeBound::new($h,
|
||||
::postgres::types::range::Exclusive)))
|
||||
::postgres::types::range::BoundType::Exclusive)))
|
||||
);
|
||||
('(', $h:expr ']') => (
|
||||
::postgres::types::range::Range::new(None,
|
||||
Some(::postgres::types::range::RangeBound::new($h,
|
||||
::postgres::types::range::Inclusive)))
|
||||
::postgres::types::range::BoundType::Inclusive)))
|
||||
);
|
||||
('(' $l:expr, ')') => (
|
||||
::postgres::types::range::Range::new(
|
||||
Some(::postgres::types::range::RangeBound::new($l,
|
||||
::postgres::types::range::Exclusive)), None)
|
||||
::postgres::types::range::BoundType::Exclusive)), None)
|
||||
);
|
||||
('[' $l:expr, ')') => (
|
||||
::postgres::types::range::Range::new(
|
||||
Some(::postgres::types::range::RangeBound::new($l,
|
||||
::postgres::types::range::Inclusive)), None)
|
||||
::postgres::types::range::BoundType::Inclusive)), None)
|
||||
);
|
||||
('(' $l:expr, $h:expr ')') => (
|
||||
::postgres::types::range::Range::new(
|
||||
Some(::postgres::types::range::RangeBound::new($l,
|
||||
::postgres::types::range::Exclusive)),
|
||||
::postgres::types::range::BoundType::Exclusive)),
|
||||
Some(::postgres::types::range::RangeBound::new($h,
|
||||
::postgres::types::range::Exclusive)))
|
||||
::postgres::types::range::BoundType::Exclusive)))
|
||||
);
|
||||
('(' $l:expr, $h:expr ']') => (
|
||||
::postgres::types::range::Range::new(
|
||||
Some(::postgres::types::range::RangeBound::new($l,
|
||||
::postgres::types::range::Exclusive)),
|
||||
::postgres::types::range::BoundType::Exclusive)),
|
||||
Some(::postgres::types::range::RangeBound::new($h,
|
||||
::postgres::types::range::Inclusive)))
|
||||
::postgres::types::range::BoundType::Inclusive)))
|
||||
);
|
||||
('[' $l:expr, $h:expr ')') => (
|
||||
::postgres::types::range::Range::new(
|
||||
Some(::postgres::types::range::RangeBound::new($l,
|
||||
::postgres::types::range::Inclusive)),
|
||||
::postgres::types::range::BoundType::Inclusive)),
|
||||
Some(::postgres::types::range::RangeBound::new($h,
|
||||
::postgres::types::range::Exclusive)))
|
||||
::postgres::types::range::BoundType::Exclusive)))
|
||||
);
|
||||
('[' $l:expr, $h:expr ']') => (
|
||||
::postgres::types::range::Range::new(
|
||||
Some(::postgres::types::range::RangeBound::new($l,
|
||||
::postgres::types::range::Inclusive)),
|
||||
::postgres::types::range::BoundType::Inclusive)),
|
||||
Some(::postgres::types::range::RangeBound::new($h,
|
||||
::postgres::types::range::Inclusive)))
|
||||
::postgres::types::range::BoundType::Inclusive)))
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -6,7 +6,8 @@ extern crate serialize;
|
||||
extern crate url;
|
||||
extern crate openssl;
|
||||
|
||||
use openssl::ssl::{SslContext, Sslv3};
|
||||
use openssl::ssl::SslContext;
|
||||
use openssl::ssl::SslMethod::Sslv3;
|
||||
use std::io::timer;
|
||||
use std::time::Duration;
|
||||
|
||||
|
@ -2,12 +2,11 @@ use std::i32;
|
||||
|
||||
use postgres::types::range::{RangeBound,
|
||||
Range,
|
||||
Inclusive,
|
||||
Exclusive,
|
||||
UpperBound,
|
||||
LowerBound,
|
||||
Normalizable,
|
||||
BoundType};
|
||||
use postgres::types::range::BoundType::{Inclusive, Exclusive};
|
||||
|
||||
#[test]
|
||||
fn test_range_bound_lower_lt() {
|
||||
|
Loading…
Reference in New Issue
Block a user