Skip to content

Commit 4adf743

Browse files
committed
Update for upstream changes
1 parent 61f9f43 commit 4adf743

7 files changed

Lines changed: 19 additions & 29 deletions

File tree

configure

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,3 @@ git submodule update --init
2525
sed -e "s|%PREFIX%|$PREFIX|" \
2626
-e "s|%CONFIGURE_ARGS%|$CONFIGURE_ARGS|" \
2727
< Makefile.in > Makefile
28-
29-
touch config.stamp

src/lib.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ fn main() {
5555
```
5656
*/
5757

58-
#[crate_id="github.com/sfackler/rust-postgres#postgres:0.0"];
59-
#[crate_type="rlib"];
60-
#[crate_type="dylib"];
61-
#[doc(html_root_url="http://www.rust-ci.org/sfackler/rust-postgres/doc")];
58+
#![crate_id="github.com/sfackler/rust-postgres#postgres:0.0"]
59+
#![crate_type="rlib"]
60+
#![crate_type="dylib"]
61+
#![doc(html_root_url="http://www.rust-ci.org/sfackler/rust-postgres/doc")]
6262

63-
#[warn(missing_doc)];
63+
#![warn(missing_doc)]
6464

65-
#[feature(macro_rules, struct_variant, phase)];
65+
#![feature(macro_rules, struct_variant, phase)]
6666

6767
extern crate collections;
6868
extern crate openssl;
@@ -386,7 +386,7 @@ impl Writer for InternalStream {
386386
struct InnerPostgresConnection {
387387
stream: BufferedStream<InternalStream>,
388388
next_stmt_id: uint,
389-
notice_handler: ~PostgresNoticeHandler,
389+
notice_handler: ~PostgresNoticeHandler:Send,
390390
notifications: RingBuf<PostgresNotification>,
391391
cancel_data: PostgresCancelData,
392392
unknown_types: HashMap<Oid, ~str>,
@@ -436,7 +436,7 @@ impl InnerPostgresConnection {
436436
let mut conn = InnerPostgresConnection {
437437
stream: BufferedStream::new(stream),
438438
next_stmt_id: 0,
439-
notice_handler: ~DefaultNoticeHandler as ~PostgresNoticeHandler,
439+
notice_handler: ~DefaultNoticeHandler,
440440
notifications: RingBuf::new(),
441441
cancel_data: PostgresCancelData { process_id: 0, secret_key: 0 },
442442
unknown_types: HashMap::new(),
@@ -551,8 +551,8 @@ impl InnerPostgresConnection {
551551
}
552552
}
553553

554-
fn set_notice_handler(&mut self, handler: ~PostgresNoticeHandler)
555-
-> ~PostgresNoticeHandler {
554+
fn set_notice_handler(&mut self, handler: ~PostgresNoticeHandler:Send)
555+
-> ~PostgresNoticeHandler:Send {
556556
mem::replace(&mut self.notice_handler, handler)
557557
}
558558

@@ -728,8 +728,8 @@ impl PostgresConnection {
728728
}
729729

730730
/// Sets the notice handler for the connection, returning the old handler.
731-
pub fn set_notice_handler(&self, handler: ~PostgresNoticeHandler)
732-
-> ~PostgresNoticeHandler {
731+
pub fn set_notice_handler(&self, handler: ~PostgresNoticeHandler:Send)
732+
-> ~PostgresNoticeHandler:Send {
733733
self.conn.borrow_mut().set_notice_handler(handler)
734734
}
735735

src/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ fn test_custom_notice_handler() {
769769
}
770770

771771
let conn = or_fail!(PostgresConnection::connect("postgres://postgres@localhost?client_min_messages=NOTICE", &NoSsl));
772-
conn.set_notice_handler(~Handler as ~PostgresNoticeHandler);
772+
conn.set_notice_handler(~Handler);
773773
or_fail!(conn.execute("CREATE FUNCTION pg_temp.note() RETURNS INT AS $$
774774
BEGIN
775775
RAISE NOTICE 'note';

src/types/mod.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Traits dealing with Postgres data types
2-
#[macro_escape];
2+
#![macro_escape]
33

44
use collections::HashMap;
55
use uuid::Uuid;
@@ -73,12 +73,12 @@ static RANGE_LOWER_INCLUSIVE: i8 = 0b0000_0010;
7373
static RANGE_EMPTY: i8 = 0b0000_0001;
7474

7575
macro_rules! make_postgres_type(
76-
($($doc:attr $oid:ident => $variant:ident $(member $member:ident)*),+) => (
76+
($(#[$doc:meta] $oid:ident => $variant:ident $(member $member:ident)*),+) => (
7777
/// A Postgres type
7878
#[deriving(Eq, Clone, Show)]
7979
pub enum PostgresType {
8080
$(
81-
$doc
81+
#[$doc]
8282
$variant,
8383
)+
8484
/// An unknown type
@@ -504,14 +504,6 @@ impl FromSql for HashMap<~str, Option<~str>> {
504504
ret.map(|ok| ok.unwrap())
505505
}
506506
}
507-
macro_rules! or_fail(
508-
($e:expr) => (
509-
match $e {
510-
Ok(ok) => ok,
511-
Err(err) => fail!("{}", err)
512-
}
513-
)
514-
)
515507

516508
/// A trait for types that can be converted into Postgres values
517509
pub trait ToSql {

src/types/range.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Types dealing with ranges of values
2-
#[macro_escape];
2+
#![macro_escape]
33

44
use std::fmt;
55
use std::i32;

submodules/rust-openssl

Submodule rust-openssl updated from 761901d to bf2dadd

submodules/rust-phf

Submodule rust-phf updated from 84aa16d to ab0ea82

0 commit comments

Comments
 (0)