refactor: clean up clippy warnings

This commit is contained in:
izzy
2025-06-07 17:50:11 +01:00
parent 911ffc767e
commit 8cc4bbea4d
22 changed files with 37 additions and 47 deletions

View File

@@ -16,7 +16,7 @@ pub async fn fetch_public_bot(
target: Reference,
) -> Result<Json<PublicBot>> {
let bot = db.fetch_bot(&target.id).await?;
if !bot.public && user.map_or(true, |x| x.id != bot.owner) {
if !bot.public && user.is_none_or(|x| x.id != bot.owner) {
return Err(create_error!(NotFound));
}