cargo fmt + clippy

This commit is contained in:
2024-08-19 17:52:16 +02:00
parent 3556eb37ea
commit d1d06514a9
6 changed files with 23 additions and 19 deletions

@ -23,4 +23,4 @@ pub fn try_get_with_binary_fallback(
row.try_get::<Vec<u8>, _>(column)
.map(|v| String::from_utf8_lossy(&v).to_string())
})
}
}

@ -141,8 +141,7 @@ pub async fn create_mysql_connection_from_config(
) -> anyhow::Result<MySqlConnection> {
log_config(config);
let mut mysql_options = MySqlConnectOptions::new()
.database("mysql");
let mut mysql_options = MySqlConnectOptions::new().database("mysql");
if let Some(username) = &config.username {
mysql_options = mysql_options.username(username);
@ -168,6 +167,8 @@ pub async fn create_mysql_connection_from_config(
.await
{
Ok(connection) => connection.context("Failed to connect to the database"),
Err(_) => Err(anyhow!("Timed out after 2 seconds")).context("Failed to connect to the database"),
Err(_) => {
Err(anyhow!("Timed out after 2 seconds")).context("Failed to connect to the database")
}
}
}