summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2024-01-22 09:42:44 +0200
committerLars Wirzenius <liw@liw.fi>2024-01-22 09:42:44 +0200
commitc4d4fe11e1bf7c06472ee406a22f9d9e74c10543 (patch)
tree9eb9d767eb6c3ba21c7a3b6fc4ffb454f63fe862
parent0354e5a0e7802e5f24bbf93991018c4a4d29b7f5 (diff)
downloadradicle-native-ci-c4d4fe11e1bf7c06472ee406a22f9d9e74c10543.tar.gz
feat: order runs newest first
Signed-off-by: Lars Wirzenius <liw@liw.fi>
-rw-r--r--src/report.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/report.rs b/src/report.rs
index 8fc9fd8..f92dfbe 100644
--- a/src/report.rs
+++ b/src/report.rs
@@ -1,4 +1,5 @@
use std::{
+ cmp::Ord,
collections::HashSet,
path::{Path, PathBuf},
};
@@ -70,6 +71,8 @@ fn list_runs(repos: &[&str], run_infos: &[RunInfo]) -> Document {
doc.push_to_body(&section);
let mut list = Element::new(Tag::Ol).with_class("runlist");
+ let mut runs = runs_for_repo(repo, run_infos);
+ runs.sort_by(|a, b| b.timestamp.cmp(&a.timestamp));
for ri in runs_for_repo(repo, run_infos) {
let commit = Element::new(Tag::Code)
.with_class("commit")