mirror of
https://codeberg.org/icewind/logsmash.git
synced 2026-06-04 02:24:11 +02:00
don't store match group lines twice
This commit is contained in:
parent
c1200c5676
commit
2f3e2325df
5 changed files with 10 additions and 13 deletions
|
|
@ -27,7 +27,7 @@ pub fn footer<'a>(app: &App<'a>, params: FooterParams<'a>) -> Table<'a> {
|
|||
Table::new(
|
||||
[Row::new([
|
||||
Text::from(help(page)),
|
||||
Text::from(format!("{} unmatched items", app.unmatched.lines.len())),
|
||||
Text::from(format!("{} unmatched items", app.unmatched.count())),
|
||||
Text::from(format!("{} parse errors", app.error_count)),
|
||||
])],
|
||||
widths,
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ pub fn match_list<'a>(app: &'a App<'a>, filter: &Filter) -> ScrollbarTable<'a> {
|
|||
];
|
||||
|
||||
let all = log_row(&app.all, app, "All lines");
|
||||
let unmatched = if app.unmatched.lines.is_empty() {
|
||||
let unmatched = if app.unmatched.count() == 0 {
|
||||
Either::Right(empty())
|
||||
} else {
|
||||
Either::Left(once(log_row(&app.unmatched, app, "Unmatched lines")))
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ pub fn grouped_lines<'a>(
|
|||
Text::from(""),
|
||||
Text::from(""),
|
||||
Text::from(log_match.sparkline.as_str()),
|
||||
Text::from(log_match.lines.len().to_string()),
|
||||
Text::from(log_match.count().to_string()),
|
||||
]))
|
||||
.chain(
|
||||
grouped
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue