From fbef60eed63cce236728f37e4f461bb2bff5e035 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 7 Sep 2025 12:42:24 +0200 Subject: [PATCH] cli/sync: Replace manual pushing with Table::extend() Signed-off-by: Matthias Beyer --- crates/radicle-cli/src/commands/sync.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/crates/radicle-cli/src/commands/sync.rs b/crates/radicle-cli/src/commands/sync.rs index 81c962c2..73b2cd52 100644 --- a/crates/radicle-cli/src/commands/sync.rs +++ b/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() {