bin/ui: Simplify collecting of children vec

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer
2025-12-09 13:17:57 +01:00
committed by Erik Kundt
parent d52dca76b6
commit 02dc8e9a34
+1 -4
View File
@@ -688,10 +688,7 @@ impl CommentItem {
impl ToTree<String> for CommentItem {
fn rows(&self) -> Vec<TreeItem<'_, String>> {
let mut children = vec![];
for comment in &self.replies {
children.extend(comment.rows());
}
let children = self.replies.iter().flat_map(CommentItem::rows).collect();
let author = match &self.author.alias {
Some(alias) => {