Fixing clippy expect issue.
This commit is contained in:
parent
a7a0d35ed3
commit
e5a3dc04bf
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ impl<T> MaybeOptional<T> for Option<T> {
|
||||||
|
|
||||||
pub fn establish_unpooled_connection() -> PgConnection {
|
pub fn establish_unpooled_connection() -> PgConnection {
|
||||||
let db_url = Settings::get().get_database_url();
|
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)]
|
#[derive(EnumString, ToString, Debug, Serialize, Deserialize)]
|
||||||
|
|
Loading…
Reference in a new issue