From: Nutomic Date: Sat, 5 Nov 2022 00:53:46 +0000 (+0000) Subject: Remove explicit panic from db connection code (fixes #2533) (#2535) X-Git-Url: http://these/git/readmes/static/git-logo.png?a=commitdiff_plain;h=2207fed0f577fd68f0b70c53aef3aaa3ba656c89;p=lemmy.git Remove explicit panic from db connection code (fixes #2533) (#2535) --- diff --git a/src/main.rs b/src/main.rs index 9ef2f541..4667df44 100644 --- a/src/main.rs +++ b/src/main.rs @@ -78,8 +78,7 @@ async fn main() -> Result<(), LemmyError> { let pool = Pool::builder() .max_size(settings.database.pool_size) .min_idle(Some(1)) - .build(manager) - .unwrap_or_else(|_| panic!("Error connecting to {}", db_url)); + .build(manager)?; // Run the migrations from code let settings_cloned = settings.to_owned();