diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-07-24 17:08:31 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-07-24 17:08:31 -0700 |
commit | f080bf59d9dcdd95376b6c8a128070c6528e2167 (patch) | |
tree | 79883ca26f916583cd00a147bcc92108ac3a8e5c /rust/src/lib.rs | |
parent | ea2f4486d7c2e7c6a688ca11aa7db75f622887d3 (diff) | |
download | fatcat-f080bf59d9dcdd95376b6c8a128070c6528e2167.tar.gz fatcat-f080bf59d9dcdd95376b6c8a128070c6528e2167.zip |
whole bunch of clippy fixes
Diffstat (limited to 'rust/src/lib.rs')
-rw-r--r-- | rust/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 86e367e4..fd871f55 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -66,7 +66,8 @@ pub fn establish_connection() -> PgConnection { dotenv().ok(); let database_url = env::var("DATABASE_URL").expect("DATABASE_URL must be set"); - PgConnection::establish(&database_url).expect(&format!("Error connecting to {}", database_url)) + PgConnection::establish(&database_url) + .unwrap_or_else(|_| panic!("Error connecting to {}", database_url)) } /// Instantiate a new API server with a pooled database connection |