Dont log db url on connection error (fixes #4453) (#4456)

* Dont log db url on connection error (fixes #4453)

* remove format
This commit is contained in:
Nutomic 2024-02-16 14:50:06 +01:00 committed by GitHub
parent 86b44c2a4d
commit ffcf415cac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -369,8 +369,7 @@ pub const MIGRATIONS: EmbeddedMigrations = embed_migrations!();
fn run_migrations(db_url: &str) -> Result<(), LemmyError> {
// Needs to be a sync connection
let mut conn =
PgConnection::establish(db_url).with_context(|| format!("Error connecting to {db_url}"))?;
let mut conn = PgConnection::establish(db_url).with_context(|| "Error connecting to database")?;
info!("Running Database migrations (This may take a long time)...");
conn