cli/sync: Replace manual pushing with Table::extend()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
370ae3643a
commit
fbef60eed6
|
|
@ -360,7 +360,7 @@ fn sync_status(
|
||||||
|
|
||||||
sort_seeds_by(local_nid, &mut seeds, &aliases, &options.sort_by);
|
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 {
|
let (status, head, time) = match seed.sync {
|
||||||
Some(SyncStatus::Synced {
|
Some(SyncStatus::Synced {
|
||||||
at: SyncedAt { oid, timestamp },
|
at: SyncedAt { oid, timestamp },
|
||||||
|
|
@ -391,19 +391,21 @@ fn sync_status(
|
||||||
term::paint(String::new()),
|
term::paint(String::new()),
|
||||||
term::paint(String::new()),
|
term::paint(String::new()),
|
||||||
),
|
),
|
||||||
None => continue,
|
None => return None,
|
||||||
};
|
};
|
||||||
|
|
||||||
let (alias, nid) = Author::new(&seed.nid, profile, options.verbose).labels();
|
let (alias, nid) = Author::new(&seed.nid, profile, options.verbose).labels();
|
||||||
|
|
||||||
table.push([
|
Some([
|
||||||
nid,
|
nid,
|
||||||
alias,
|
alias,
|
||||||
status.into(),
|
status.into(),
|
||||||
term::format::secondary(head).into(),
|
term::format::secondary(head).into(),
|
||||||
time.dim().italic().into(),
|
time.dim().italic().into(),
|
||||||
]);
|
])
|
||||||
}
|
});
|
||||||
|
|
||||||
|
table.extend(seeds);
|
||||||
table.print();
|
table.print();
|
||||||
|
|
||||||
if profile.hints() {
|
if profile.hints() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue