diff options
author | Lars Wirzenius <liw@liw.fi> | 2024-01-22 09:42:44 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2024-01-22 09:42:44 +0200 |
commit | c4d4fe11e1bf7c06472ee406a22f9d9e74c10543 (patch) | |
tree | 9eb9d767eb6c3ba21c7a3b6fc4ffb454f63fe862 | |
parent | 0354e5a0e7802e5f24bbf93991018c4a4d29b7f5 (diff) | |
download | radicle-native-ci-c4d4fe11e1bf7c06472ee406a22f9d9e74c10543.tar.gz |
feat: order runs newest first
Signed-off-by: Lars Wirzenius <liw@liw.fi>
-rw-r--r-- | src/report.rs | 3 |
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(§ion); 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") |