~vpzom/lotide

c44b438143257103308c935a00aeccb56f0830b5 — Colin Reeder 8 months ago aa243aa
Replace if block with simple expression
1 files changed, 1 insertions(+), 7 deletions(-)

M src/routes/api/mod.rs
M src/routes/api/mod.rs => src/routes/api/mod.rs +1 -7
@@ 557,13 557,7 @@ async fn apply_comments_replies<'a, T>(
        }
    }

    comments.retain(|(_, comment)| {
        if comment.deleted && !comment.has_replies {
            false
        } else {
            true
        }
    });
    comments.retain(|(_, comment)| !comment.deleted || comment.has_replies);

    Ok(())
}