From: Dessalines Date: Sun, 12 Jan 2020 22:04:58 +0000 (-0500) Subject: Fixing clippy expect issue. X-Git-Url: http://these/git/%7B%60/feeds/u/readmes/static/bundle.js?a=commitdiff_plain;h=e5a3dc04bf3ffc551f4f584f1ac26ec8d099db6e;p=lemmy.git Fixing clippy expect issue. --- diff --git a/server/src/db/mod.rs b/server/src/db/mod.rs index c25a6456..fef3ffce 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)]