Skip to content

Commit e68810a

Browse files
committed
more fixups
1 parent a4037dd commit e68810a

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

tokio-postgres/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ pub use crate::error::Error;
126126
pub use crate::generic_client::GenericClient;
127127
pub use crate::portal::Portal;
128128
pub use crate::query::RowStream;
129-
pub use crate::replication_client::ReplicationClient;
129+
pub use crate::replication_client::{ReplicationClient, ReplicationStream};
130130
pub use crate::row::{Row, SimpleQueryRow};
131131
pub use crate::simple_query::SimpleQueryStream;
132132
#[cfg(feature = "runtime")]

tokio-postgres/src/replication_client.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl CreateReplicationSlotResponse {
114114
///
115115
/// #[tokio::main]
116116
/// async fn main() -> Result<(), Error> {
117-
/// let conninfo = "host=/tmp user=postgres dbname=postgres";
117+
/// let conninfo = "host=localhost user=postgres dbname=postgres";
118118
///
119119
/// // form replication connection
120120
/// let (mut rclient, rconnection) =
@@ -161,7 +161,7 @@ impl CreateReplicationSlotResponse {
161161
///
162162
/// #[tokio::main]
163163
/// async fn main() -> Result<(), Error> {
164-
/// let conninfo = "host=/tmp user=postgres dbname=postgres";
164+
/// let conninfo = "host=localhost user=postgres dbname=postgres";
165165
///
166166
/// // form replication connection
167167
/// let (mut rclient, rconnection) =
@@ -217,7 +217,7 @@ pub struct ReplicationClient {
217217
}
218218

219219
impl ReplicationClient {
220-
pub fn new(client: Client) -> ReplicationClient {
220+
pub(crate) fn new(client: Client) -> ReplicationClient {
221221
ReplicationClient {
222222
client: client,
223223
replication_stream_active: false,
@@ -615,7 +615,9 @@ impl ReplicationClient {
615615
}
616616
}
617617

618-
/// A stream of `START_REPLICATION` query data.
618+
/// A stream of data from a `START_REPLICATION` command.
619+
///
620+
/// Intended to be used with the [next()](tokio::stream::StreamExt::next) method.
619621
#[pin_project(PinnedDrop)]
620622
pub struct ReplicationStream<'a> {
621623
rclient: &'a mut ReplicationClient,

0 commit comments

Comments
 (0)