Fix breakage
This commit is contained in:
parent
27917327db
commit
98a980b5ec
@ -345,12 +345,13 @@ pub struct CancelData {
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// # use postgres::{Connection, SslMode};
|
||||
/// # use std::thread::Thread;
|
||||
/// # let url = "";
|
||||
/// let conn = Connection::connect(url, &SslMode::None).unwrap();
|
||||
/// let cancel_data = conn.cancel_data();
|
||||
/// spawn(move || {
|
||||
/// Thread::spawn(move || {
|
||||
/// conn.execute("SOME EXPENSIVE QUERY", &[]).unwrap();
|
||||
/// });
|
||||
/// }).detach();
|
||||
/// # let _ =
|
||||
/// postgres::cancel_query(url, &SslMode::None, cancel_data);
|
||||
/// ```
|
||||
|
@ -112,7 +112,7 @@ pub trait Normalizable {
|
||||
macro_rules! bounded_normalizable {
|
||||
($t:ident) => (
|
||||
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_) {
|
||||
(Upper, Inclusive) => {
|
||||
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>);
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user