Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
feat(src/db.rs): Db::get_all_runs returns runs in timestamp order
Lars Wirzenius committed 1 year ago
commit 34f7fcf86900a7b19ba5806d27870ed6d9b55605
parent 285047d5a5d50c40cc053ca2afd59f046b3dda1b
1 file changed +2 -1
modified src/db.rs
@@ -320,7 +320,7 @@ impl Db {
                        .stmt
                        .read("json")
                        .map_err(|e| DbError::get_run(&select.sql, e))?;
-
                    let run = serde_json::from_str(&json)
+
                    let run: Run = serde_json::from_str(&json)
                        .map_err(|e| DbError::run_from_json(&json, e))?;
                    runs.push(run);
                }
@@ -333,6 +333,7 @@ impl Db {
            }
        }

+
        runs.sort_by_cached_key(|run| run.timestamp().to_string());
        Ok(runs)
    }