diff options
author | Dessalines <tyhou13@gmx.com> | 2020-01-12 17:04:58 -0500 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-01-12 17:04:58 -0500 |
commit | e5a3dc04bf3ffc551f4f584f1ac26ec8d099db6e (patch) | |
tree | ae0423badccd87d0cb42e80045ac78e91cd83cad | |
parent | a7a0d35ed34f4bd27d6d62546b60d923031a70dc (diff) |
Fixing clippy expect issue.
-rw-r--r-- | server/src/db/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<T> MaybeOptional<T> for Option<T> { 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)] |