mirror of
https://seed.radicle.dev/rad:z39mP9rQAaGmERfUMPULfPUi473tY.git
synced 2026-11-16 00:10:38 +08:00
bin/ui: Simplify collecting of children vec
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
committed by
Erik Kundt
parent
d52dca76b6
commit
02dc8e9a34
+1
-4
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user