use anyhow macro

This commit is contained in:
dullbananas 2023-12-20 22:52:01 -07:00 committed by GitHub
parent abcf331a26
commit 029cb25e77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -350,7 +350,7 @@ fn run_migrations(db_url: &str) -> Result<(), LemmyError> {
info!("Running Database migrations (This may take a long time)..."); info!("Running Database migrations (This may take a long time)...");
conn conn
.run_pending_migrations(MIGRATIONS) .run_pending_migrations(MIGRATIONS)
.map_err(|e| anyhow::Error::msg(format!("Couldn't run DB Migrations: {e}")))?; .map_err(|e| anyhow::anyhow!("Couldn't run DB Migrations: {e}"))?;
info!("Database migrations complete."); info!("Database migrations complete.");
Ok(()) Ok(())