From 67247e070f815c60f938840e3b07bc9822b4bcab Mon Sep 17 00:00:00 2001 From: Luca Palmieri Date: Tue, 28 Dec 2021 17:47:16 +0100 Subject: [PATCH] Fix clippy errors --- src/main.rs | 2 +- tests/health_check.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index a811adc..375f4bb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,7 @@ async fn main() -> std::io::Result<()> { let configuration = get_configuration().expect("Failed to read configuration."); let connection_pool = - PgPool::connect(&configuration.database.connection_string().expose_secret()) + PgPool::connect(configuration.database.connection_string().expose_secret()) .await .expect("Failed to connect to Postgres."); diff --git a/tests/health_check.rs b/tests/health_check.rs index ed3e5d7..c11808a 100644 --- a/tests/health_check.rs +++ b/tests/health_check.rs @@ -50,7 +50,7 @@ async fn spawn_app() -> TestApp { pub async fn configure_database(config: &DatabaseSettings) -> PgPool { // Create database let mut connection = - PgConnection::connect(&config.connection_string_without_db().expose_secret()) + PgConnection::connect(config.connection_string_without_db().expose_secret()) .await .expect("Failed to connect to Postgres"); connection @@ -59,7 +59,7 @@ pub async fn configure_database(config: &DatabaseSettings) -> PgPool { .expect("Failed to create database."); // Migrate database - let connection_pool = PgPool::connect(&config.connection_string().expose_secret()) + let connection_pool = PgPool::connect(config.connection_string().expose_secret()) .await .expect("Failed to connect to Postgres."); sqlx::migrate!("./migrations")