aboutsummaryrefslogtreecommitdiff
path: root/src/list
diff options
context:
space:
mode:
authorMax Audron <audron@cocaine.farm>2022-06-07 12:28:18 +0200
committerMaximilian Manz <maximilian.manz@de.clara.net>2022-06-20 11:33:04 +0200
commit012bf0593df7bf93afb73db5c87dd8ccc36e851f (patch)
tree7606ed25710a058012e8ffb8bda736bbfd6a1a3f /src/list
parentreorganize file structure and cleanup lints (diff)
move to mostly sync architecture
the git repository struct is not sharable between threads, thus go single threaded for now and only call onto the tokio runtime for lookups towards gitlab.
Diffstat (limited to 'src/list')
-rw-r--r--src/list/mod.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/list/mod.rs b/src/list/mod.rs
index ed71e6a..0bf6872 100644
--- a/src/list/mod.rs
+++ b/src/list/mod.rs
@@ -1,10 +1,14 @@
use anyhow::Result;
+use itertools::Itertools;
use crate::repo::Repos;
impl crate::GTree {
- pub async fn list(&self, repos: Repos) -> Result<()> {
- repos.iter().for_each(|repo| println!("{}", repo));
+ pub fn list(&self, repos: Repos) -> Result<()> {
+ repos.iter().sorted_by_key(|x| x.0).for_each(|(_, repo)| {
+ let repo = repo.read().unwrap();
+ println!("{}", repo)
+ });
Ok(())
}