Fix breakage

This commit is contained in:
Steven Fackler 2014-12-21 13:52:48 -05:00
parent 27917327db
commit 98a980b5ec
3 changed files with 5 additions and 4 deletions

View File

@ -345,12 +345,13 @@ pub struct CancelData {
/// ///
/// ```rust,no_run /// ```rust,no_run
/// # use postgres::{Connection, SslMode}; /// # use postgres::{Connection, SslMode};
/// # use std::thread::Thread;
/// # let url = ""; /// # let url = "";
/// let conn = Connection::connect(url, &SslMode::None).unwrap(); /// let conn = Connection::connect(url, &SslMode::None).unwrap();
/// let cancel_data = conn.cancel_data(); /// let cancel_data = conn.cancel_data();
/// spawn(move || { /// Thread::spawn(move || {
/// conn.execute("SOME EXPENSIVE QUERY", &[]).unwrap(); /// conn.execute("SOME EXPENSIVE QUERY", &[]).unwrap();
/// }); /// }).detach();
/// # let _ = /// # let _ =
/// postgres::cancel_query(url, &SslMode::None, cancel_data); /// postgres::cancel_query(url, &SslMode::None, cancel_data);
/// ``` /// ```

View File

@ -112,7 +112,7 @@ pub trait Normalizable {
macro_rules! bounded_normalizable { macro_rules! bounded_normalizable {
($t:ident) => ( ($t:ident) => (
impl Normalizable for $t { impl Normalizable for $t {
fn normalize<S: BoundSided>(bound: RangeBound<S, $t>) -> RangeBound<S, $t> { fn normalize<S>(bound: RangeBound<S, $t>) -> RangeBound<S, $t> where S: BoundSided {
match (BoundSided::side(None::<S>), bound.type_) { match (BoundSided::side(None::<S>), bound.type_) {
(Upper, Inclusive) => { (Upper, Inclusive) => {
assert!(bound.value != $t::MAX); assert!(bound.value != $t::MAX);

View File

@ -42,7 +42,7 @@ to_array_impl!(Type::TimestampArray | Type::TimestampTZArray, Timespec);
to_array_impl!(Type::TsRangeArray | Type::TstzRangeArray, Range<Timespec>); to_array_impl!(Type::TsRangeArray | Type::TstzRangeArray, Range<Timespec>);
impl Normalizable for Timespec { impl Normalizable for Timespec {
fn normalize<S: BoundSided>(bound: RangeBound<S, Timespec>) -> RangeBound<S, Timespec> { fn normalize<S>(bound: RangeBound<S, Timespec>) -> RangeBound<S, Timespec> where S: BoundSided {
bound bound
} }
} }