limit table to 20 items

This commit is contained in:
Kasper Juul Hermansen 2023-01-10 22:33:35 +01:00
parent b7a865b48e
commit ffc0659a84
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912

View File

@ -46,7 +46,7 @@ impl Review {
Cell::new("title").add_attribute(comfy_table::Attribute::Bold), Cell::new("title").add_attribute(comfy_table::Attribute::Bold),
Cell::new("number").add_attribute(comfy_table::Attribute::Bold), Cell::new("number").add_attribute(comfy_table::Attribute::Bold),
]) ])
.add_rows(prs.iter().map(|pr| { .add_rows(prs.iter().take(20).map(|pr| {
let pr = pr.clone(); let pr = pr.clone();
vec![ vec![
Cell::new(pr.repository.name).fg(comfy_table::Color::Green), Cell::new(pr.repository.name).fg(comfy_table::Color::Green),