Skip to content

Commit 98a980b

Browse files
committed
Fix breakage
1 parent 2791732 commit 98a980b

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,12 +345,13 @@ pub struct CancelData {
345345
///
346346
/// ```rust,no_run
347347
/// # use postgres::{Connection, SslMode};
348+
/// # use std::thread::Thread;
348349
/// # let url = "";
349350
/// let conn = Connection::connect(url, &SslMode::None).unwrap();
350351
/// let cancel_data = conn.cancel_data();
351-
/// spawn(move || {
352+
/// Thread::spawn(move || {
352353
/// conn.execute("SOME EXPENSIVE QUERY", &[]).unwrap();
353-
/// });
354+
/// }).detach();
354355
/// # let _ =
355356
/// postgres::cancel_query(url, &SslMode::None, cancel_data);
356357
/// ```

src/types/range.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ pub trait Normalizable {
112112
macro_rules! bounded_normalizable {
113113
($t:ident) => (
114114
impl Normalizable for $t {
115-
fn normalize<S: BoundSided>(bound: RangeBound<S, $t>) -> RangeBound<S, $t> {
115+
fn normalize<S>(bound: RangeBound<S, $t>) -> RangeBound<S, $t> where S: BoundSided {
116116
match (BoundSided::side(None::<S>), bound.type_) {
117117
(Upper, Inclusive) => {
118118
assert!(bound.value != $t::MAX);

src/types/time.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ to_array_impl!(Type::TimestampArray | Type::TimestampTZArray, Timespec);
4242
to_array_impl!(Type::TsRangeArray | Type::TstzRangeArray, Range<Timespec>);
4343

4444
impl Normalizable for Timespec {
45-
fn normalize<S: BoundSided>(bound: RangeBound<S, Timespec>) -> RangeBound<S, Timespec> {
45+
fn normalize<S>(bound: RangeBound<S, Timespec>) -> RangeBound<S, Timespec> where S: BoundSided {
4646
bound
4747
}
4848
}

0 commit comments

Comments
 (0)