summaryrefslogtreecommitdiffstats
path: root/rust/src/lib.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-07-24 17:08:31 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-07-24 17:08:31 -0700
commitf080bf59d9dcdd95376b6c8a128070c6528e2167 (patch)
tree79883ca26f916583cd00a147bcc92108ac3a8e5c /rust/src/lib.rs
parentea2f4486d7c2e7c6a688ca11aa7db75f622887d3 (diff)
downloadfatcat-f080bf59d9dcdd95376b6c8a128070c6528e2167.tar.gz
fatcat-f080bf59d9dcdd95376b6c8a128070c6528e2167.zip
whole bunch of clippy fixes
Diffstat (limited to 'rust/src/lib.rs')
-rw-r--r--rust/src/lib.rs3
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