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> {
let is_mod = CommunityModeratorView::for_community(pool, community_id)
.await
.is_ok_and(|v| {
v.into_iter()
.map(|m| m.moderator.id)
.any(|i| i == person_id)
});
.map(|v| v.into_iter().any(|m| m.moderator.id == person_id))
.unwrap_or(false);
if is_mod {
return Ok(true);
}