From f2107568f0731987ae05b69212c76823d75184de Mon Sep 17 00:00:00 2001 From: Luke Harding Date: Sat, 4 May 2024 15:17:42 -0400 Subject: [PATCH] Change establish_connection to use &str as opposed to &String --- server/src/db/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/db/mod.rs b/server/src/db/mod.rs index 76c9e12..cff24e2 100644 --- a/server/src/db/mod.rs +++ b/server/src/db/mod.rs @@ -20,8 +20,8 @@ pub mod models; pub const MIGRATIONS: EmbeddedMigrations = embed_migrations!("./migrations"); -pub fn establish_connection(database_url: &String) -> Result> { - Ok(PgConnection::establish(&database_url)?) +pub fn establish_connection(database_url: &str) -> Result> { + Ok(PgConnection::establish(database_url)?) } pub fn run_migrations(