Fix breakage
This commit is contained in:
parent
27917327db
commit
98a980b5ec
@ -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);
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -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);
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user