From a6d88fdfb09b62b36b0b595cdcbb44422860d583 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 12 Jan 2020 17:04:58 -0500 Subject: [PATCH] Fixing clippy expect issue. --- server/src/db/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/db/mod.rs b/server/src/db/mod.rs index c25a645..fef3ffc 100644 --- a/server/src/db/mod.rs +++ b/server/src/db/mod.rs @@ -112,7 +112,7 @@ impl MaybeOptional for Option { pub fn establish_unpooled_connection() -> PgConnection { let db_url = Settings::get().get_database_url(); - PgConnection::establish(&db_url).expect(&format!("Error connecting to {}", db_url)) + PgConnection::establish(&db_url).unwrap_or_else(|_| panic!("Error connecting to {}", db_url)) } #[derive(EnumString, ToString, Debug, Serialize, Deserialize)]