From 4857d051e18bd1c49831c5726cdfc5e53693e4ab Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Mon, 27 Jul 2020 02:22:59 -0700 Subject: [PATCH] chore: update listener example --- examples/postgres/listen/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/postgres/listen/src/main.rs b/examples/postgres/listen/src/main.rs index dadf7ab9b..ed779b5c3 100644 --- a/examples/postgres/listen/src/main.rs +++ b/examples/postgres/listen/src/main.rs @@ -11,9 +11,9 @@ async fn main() -> Result<(), Box> { println!("Building PG pool."); let conn_str = std::env::var("DATABASE_URL").expect("Env var DATABASE_URL is required for this example."); - let pool = sqlx::PgPool::new(&conn_str).await?; + let pool = sqlx::PgPool::connect(&conn_str).await?; - let mut listener = PgListener::new(&conn_str).await?; + let mut listener = PgListener::connect(&conn_str).await?; // let notify_pool = pool.clone(); let _t = async_std::task::spawn(async move {