Radish alpha
r
rad:z39mP9rQAaGmERfUMPULfPUi473tY
Radicle terminal user interface
Radicle
Git
bin/issue: Replace collecing into Vec<_>
Matthias Beyer committed 4 months ago
commit 31dd223e2d76c93332e1b6337a49259160adbacd
parent 3816ebf
1 file changed +1 -8
modified bin/commands/issue/list.rs
@@ -124,14 +124,7 @@ impl PreviewState {
            self.selected_comments
                .get(&item.id)
                .and_then(|selection| selection.last().copied())
-
                .and_then(|comment_id| {
-
                    item.comments
-
                        .iter()
-
                        .filter(|item| item.id == comment_id)
-
                        .collect::<Vec<_>>()
-
                        .first()
-
                        .cloned()
-
                })
+
                .and_then(|comment_id| item.comments.iter().find(|item| item.id == comment_id))
        })
    }