Radish alpha
r
Radicle terminal user interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
bin/issue: Replace collecing into Vec<_>
Matthias Beyer committed 5 months ago
commit 31dd223e2d76c93332e1b6337a49259160adbacd
parent 3816ebf557ecb90fd00050c9f1ffb93340c6d9c7
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))
        })
    }