Skip to content

Commit

Permalink
Remove explicit panic from db connection code (fixes #2533) (#2535)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nutomic authored Nov 5, 2022
1 parent 9393195 commit 2207fed
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 2207fed

Please sign in to comment.