cargo clippy + fmt

This commit is contained in:
Oystein Kristoffer Tveit 2024-08-07 17:25:28 +02:00
parent 3d7d001f65
commit e1f89b7b72
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
1 changed files with 3 additions and 3 deletions

View File

@ -156,9 +156,9 @@ async fn show(args: ShowArgs, connection: &mut MySqlConnection) -> anyhow::Resul
let mut result = Vec::with_capacity(filtered_usernames.len());
for username in filtered_usernames.iter() {
// TODO: fetch all users in one query
get_database_user_for_user(username, connection)
.await?
.map(|user| result.push(user));
if let Some(user) = get_database_user_for_user(username, connection).await? {
result.push(user)
}
}
result
};