Remove usage of is_okay_and for Rust 1.67 compatibility

pull/3009/head
dullbananas 2023-06-13 05:32:40 +00:00
parent 1cd4003bdc
commit 1aa2adf2f9
1 changed files with 2 additions and 5 deletions

View File

@ -92,11 +92,8 @@ impl CommunityView {
) -> Result<bool, Error> { ) -> Result<bool, Error> {
let is_mod = CommunityModeratorView::for_community(pool, community_id) let is_mod = CommunityModeratorView::for_community(pool, community_id)
.await .await
.is_ok_and(|v| { .map(|v| v.into_iter().any(|m| m.moderator.id == person_id))
v.into_iter() .unwrap_or(false);
.map(|m| m.moderator.id)
.any(|i| i == person_id)
});
if is_mod { if is_mod {
return Ok(true); return Ok(true);
} }