|
50 | 50 | //! } |
51 | 51 | //! ``` |
52 | 52 | #![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)] |
54 | 54 | #![warn(missing_docs)] |
55 | 55 |
|
56 | 56 | #[phase(plugin, link)] |
@@ -228,7 +228,9 @@ pub struct Notifications<'conn> { |
228 | 228 | conn: &'conn Connection |
229 | 229 | } |
230 | 230 |
|
231 | | -impl<'conn> Iterator<Notification> for Notifications<'conn> { |
| 231 | +impl<'conn> Iterator for Notifications<'conn> { |
| 232 | + type Item = Notification; |
| 233 | + |
232 | 234 | /// Returns the oldest pending notification or `None` if there are none. |
233 | 235 | /// |
234 | 236 | /// ## Note |
@@ -662,7 +664,8 @@ impl InnerConnection { |
662 | 664 | resp |
663 | 665 | } |
664 | 666 |
|
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> { |
666 | 669 | for ty in it { |
667 | 670 | if let &Type::Unknown { oid, ref mut name } = ty { |
668 | 671 | *name = try!(self.get_type_name(oid)); |
@@ -1479,7 +1482,9 @@ impl<'stmt> Rows<'stmt> { |
1479 | 1482 | } |
1480 | 1483 | } |
1481 | 1484 |
|
1482 | | -impl<'stmt> Iterator<Row<'stmt>> for Rows<'stmt> { |
| 1485 | +impl<'stmt> Iterator for Rows<'stmt> { |
| 1486 | + type Item = Row<'stmt>; |
| 1487 | + |
1483 | 1488 | #[inline] |
1484 | 1489 | fn next(&mut self) -> Option<Row<'stmt>> { |
1485 | 1490 | // we'll never hit the network on a non-lazy result |
@@ -1594,7 +1599,9 @@ impl<'trans, 'stmt> LazyRows<'trans, 'stmt> { |
1594 | 1599 | } |
1595 | 1600 | } |
1596 | 1601 |
|
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 | + |
1598 | 1605 | fn next(&mut self) -> Option<Result<Row<'stmt>>> { |
1599 | 1606 | self.result.try_next() |
1600 | 1607 | } |
@@ -1640,7 +1647,7 @@ impl<'a> CopyInStatement<'a> { |
1640 | 1647 | /// |
1641 | 1648 | /// Returns the number of rows copied. |
1642 | 1649 | 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)> { |
1644 | 1651 | let mut conn = self.conn.conn.borrow_mut(); |
1645 | 1652 |
|
1646 | 1653 | try!(conn.write_messages(&[ |
|
0 commit comments