Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
refactor: use a clearer way to get matching values from hashmap
✓ CI success Lars Wirzenius committed 15 days ago
commit 7739164263509eae4cc6dfb983b358a2e92046b3
parent 276187c6853c823f788f604049376561ee68e9e7
1 passed (1 total) View logs
1 file changed +2 -8
modified src/pages.rs
@@ -598,14 +598,8 @@ impl PageData {

    fn runs(&self, repoid: RepoId) -> Vec<&Run> {
        self.runs
-
            .iter()
-
            .filter_map(|(_, run)| {
-
                if run.repo_id() == repoid {
-
                    Some(run)
-
                } else {
-
                    None
-
                }
-
            })
+
            .values()
+
            .filter(|run| run.repo_id() == repoid)
            .collect()
    }