Remove explicit panic from db connection code (fixes #2533) (#2535)

This commit is contained in:
Nutomic 2022-11-05 00:53:46 +00:00 committed by GitHub
parent 9393195827
commit 2207fed0f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -78,8 +78,7 @@ async fn main() -> Result<(), LemmyError> {
let pool = Pool::builder() let pool = Pool::builder()
.max_size(settings.database.pool_size) .max_size(settings.database.pool_size)
.min_idle(Some(1)) .min_idle(Some(1))
.build(manager) .build(manager)?;
.unwrap_or_else(|_| panic!("Error connecting to {}", db_url));
// Run the migrations from code // Run the migrations from code
let settings_cloned = settings.to_owned(); let settings_cloned = settings.to_owned();