From 4c0ee2c715b9bccf201021cb3cffa906d8aa458a Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 9 Feb 2020 09:58:18 -0800 Subject: [PATCH] Example cleanup --- tokio-postgres/src/client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tokio-postgres/src/client.rs b/tokio-postgres/src/client.rs index 7f622c56..0687a08e 100644 --- a/tokio-postgres/src/client.rs +++ b/tokio-postgres/src/client.rs @@ -322,7 +322,7 @@ impl Client { /// ```no_run /// # async fn async_main(client: &tokio_postgres::Client) -> Result<(), tokio_postgres::Error> { /// use tokio_postgres::types::ToSql; - /// use futures::{pin_mut, StreamExt}; + /// use futures::{pin_mut, TryStreamExt}; /// /// let params: Vec = vec![ /// "first param".into(), @@ -334,7 +334,7 @@ impl Client { /// ).await?; /// /// pin_mut!(it); - /// while let Some(row) = it.next().await.transpose()? { + /// while let Some(row) = it.try_next().await? { /// let foo: i32 = row.get("foo"); /// println!("foo: {}", foo); /// }