Skip to content

Commit 605460c

Browse files
committed
Fix for upstream changes
1 parent 15bc551 commit 605460c

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

src/lib.rs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
//! }
5151
//! ```
5252
#![doc(html_root_url="https://sfackler.github.io/doc")]
53-
#![feature(globs, macro_rules, phase, unsafe_destructor, slicing_syntax, default_type_params, old_orphan_check)]
53+
#![feature(globs, macro_rules, phase, unsafe_destructor, slicing_syntax, default_type_params, old_orphan_check, associated_types)]
5454
#![warn(missing_docs)]
5555

5656
#[phase(plugin, link)]
@@ -228,7 +228,9 @@ pub struct Notifications<'conn> {
228228
conn: &'conn Connection
229229
}
230230

231-
impl<'conn> Iterator<Notification> for Notifications<'conn> {
231+
impl<'conn> Iterator for Notifications<'conn> {
232+
type Item = Notification;
233+
232234
/// Returns the oldest pending notification or `None` if there are none.
233235
///
234236
/// ## Note
@@ -662,7 +664,8 @@ impl InnerConnection {
662664
resp
663665
}
664666

665-
fn set_type_names<'a, I>(&mut self, mut it: I) -> Result<()> where I: Iterator<&'a mut Type> {
667+
fn set_type_names<'a, I>(&mut self, mut it: I) -> Result<()>
668+
where I: Iterator<Item=&'a mut Type> {
666669
for ty in it {
667670
if let &Type::Unknown { oid, ref mut name } = ty {
668671
*name = try!(self.get_type_name(oid));
@@ -1479,7 +1482,9 @@ impl<'stmt> Rows<'stmt> {
14791482
}
14801483
}
14811484

1482-
impl<'stmt> Iterator<Row<'stmt>> for Rows<'stmt> {
1485+
impl<'stmt> Iterator for Rows<'stmt> {
1486+
type Item = Row<'stmt>;
1487+
14831488
#[inline]
14841489
fn next(&mut self) -> Option<Row<'stmt>> {
14851490
// we'll never hit the network on a non-lazy result
@@ -1594,7 +1599,9 @@ impl<'trans, 'stmt> LazyRows<'trans, 'stmt> {
15941599
}
15951600
}
15961601

1597-
impl<'trans, 'stmt> Iterator<Result<Row<'stmt>>> for LazyRows<'trans, 'stmt> {
1602+
impl<'trans, 'stmt> Iterator for LazyRows<'trans, 'stmt> {
1603+
type Item = Result<Row<'stmt>>;
1604+
15981605
fn next(&mut self) -> Option<Result<Row<'stmt>>> {
15991606
self.result.try_next()
16001607
}
@@ -1640,7 +1647,7 @@ impl<'a> CopyInStatement<'a> {
16401647
///
16411648
/// Returns the number of rows copied.
16421649
pub fn execute<'b, I, J>(&self, mut rows: I) -> Result<uint>
1643-
where I: Iterator<J>, J: Iterator<&'b (ToSql + 'b)> {
1650+
where I: Iterator<Item=J>, J: Iterator<Item=&'b (ToSql + 'b)> {
16441651
let mut conn = self.conn.conn.borrow_mut();
16451652

16461653
try!(conn.write_messages(&[

src/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::io::IoResult;
22

33
pub fn comma_join<'a, W, I>(writer: &mut W, mut strs: I) -> IoResult<()>
4-
where W: Writer, I: Iterator<&'a str> {
4+
where W: Writer, I: Iterator<Item=&'a str> {
55
let mut first = true;
66
for str_ in strs {
77
if !first {

0 commit comments

Comments
 (0)