Skip to content

Commit dbb698b

Browse files
committed
Rename notification iterator
1 parent 3cd47fa commit dbb698b

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

src/lib.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,11 @@ pub struct PostgresNotification {
174174
}
175175

176176
/// An iterator over asynchronous notifications
177-
pub struct PostgresNotificationIterator<'conn> {
177+
pub struct PostgresNotifications<'conn> {
178178
priv conn: &'conn PostgresConnection
179179
}
180180

181-
impl<'conn > Iterator<PostgresNotification> for
182-
PostgresNotificationIterator<'conn> {
181+
impl<'conn > Iterator<PostgresNotification> for PostgresNotifications<'conn> {
183182
/// Returns the oldest pending notification or `None` if there are none.
184183
///
185184
/// # Note
@@ -649,8 +648,8 @@ impl PostgresConnection {
649648
/// Returns an iterator over asynchronous notification messages.
650649
///
651650
/// Use the `LISTEN` command to register this connection for notifications.
652-
pub fn notifications<'a>(&'a self) -> PostgresNotificationIterator<'a> {
653-
PostgresNotificationIterator {
651+
pub fn notifications<'a>(&'a self) -> PostgresNotifications<'a> {
652+
PostgresNotifications {
654653
conn: self
655654
}
656655
}
@@ -825,7 +824,7 @@ impl<'conn> PostgresTransaction<'conn> {
825824
}
826825

827826
/// Like `PostgresConnection::notifications`.
828-
pub fn notifications<'a>(&'a self) -> PostgresNotificationIterator<'a> {
827+
pub fn notifications<'a>(&'a self) -> PostgresNotifications<'a> {
829828
self.conn.notifications()
830829
}
831830

src/pool.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ extern mod extra;
44

55
use extra::arc::MutexArc;
66

7-
use super::{PostgresNotificationIterator,
7+
use super::{PostgresNotifications,
88
PostgresCancelData,
99
PostgresConnection,
1010
NormalPostgresStatement,
@@ -147,7 +147,7 @@ impl PooledPostgresConnection {
147147
}
148148

149149
/// Like `PostgresConnection::notifications`.
150-
pub fn notifications<'a>(&'a self) -> PostgresNotificationIterator<'a> {
150+
pub fn notifications<'a>(&'a self) -> PostgresNotifications<'a> {
151151
self.conn.get_ref().notifications()
152152
}
153153

0 commit comments

Comments
 (0)