mirror of https://github.com/LemmyNet/lemmy
Remove usage of is_okay_and for Rust 1.67 compatibility
parent
1cd4003bdc
commit
1aa2adf2f9
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue