Skip to content

Commit 4c0ee2c

Browse files
committed
Example cleanup
1 parent 14252af commit 4c0ee2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tokio-postgres/src/client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ impl Client {
322322
/// ```no_run
323323
/// # async fn async_main(client: &tokio_postgres::Client) -> Result<(), tokio_postgres::Error> {
324324
/// use tokio_postgres::types::ToSql;
325-
/// use futures::{pin_mut, StreamExt};
325+
/// use futures::{pin_mut, TryStreamExt};
326326
///
327327
/// let params: Vec<String> = vec![
328328
/// "first param".into(),
@@ -334,7 +334,7 @@ impl Client {
334334
/// ).await?;
335335
///
336336
/// pin_mut!(it);
337-
/// while let Some(row) = it.next().await.transpose()? {
337+
/// while let Some(row) = it.try_next().await? {
338338
/// let foo: i32 = row.get("foo");
339339
/// println!("foo: {}", foo);
340340
/// }

0 commit comments

Comments
 (0)