Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli/sync: Replace manual pushing with Table::extend()
Matthias Beyer committed 8 months ago
commit fbef60eed63cce236728f37e4f461bb2bff5e035
parent 370ae3643a57f20a88aff512db454f12ddefd258
1 file changed +7 -5
modified crates/radicle-cli/src/commands/sync.rs
@@ -360,7 +360,7 @@ fn sync_status(

    sort_seeds_by(local_nid, &mut seeds, &aliases, &options.sort_by);

-
    for seed in seeds {
+
    let seeds = seeds.into_iter().flat_map(|seed| {
        let (status, head, time) = match seed.sync {
            Some(SyncStatus::Synced {
                at: SyncedAt { oid, timestamp },
@@ -391,19 +391,21 @@ fn sync_status(
                term::paint(String::new()),
                term::paint(String::new()),
            ),
-
            None => continue,
+
            None => return None,
        };

        let (alias, nid) = Author::new(&seed.nid, profile, options.verbose).labels();

-
        table.push([
+
        Some([
            nid,
            alias,
            status.into(),
            term::format::secondary(head).into(),
            time.dim().italic().into(),
-
        ]);
-
    }
+
        ])
+
    });
+

+
    table.extend(seeds);
    table.print();

    if profile.hints() {