From 5c19bdfc3f65a70165ea8a7f5a373f84b8cab0ea Mon Sep 17 00:00:00 2001 From: Adam Jensen Date: Thu, 9 Nov 2023 07:17:17 -0500 Subject: [PATCH] Fix linter warnings --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index e5bbfce..2fd783d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -92,7 +92,7 @@ where { let lines: Vec = stream .lines() - .filter_map(|x| x.ok()) + .map_while(|x| x.ok()) .inspect(|line| { if echo { println!("{}", line); @@ -136,7 +136,7 @@ fn latency_display_width(max_inter_line_latency: chrono::Duration, latency_unit: latency_display_width } -fn max_inter_line_latency(lines: &Vec) -> chrono::Duration { +fn max_inter_line_latency(lines: &[AnnotatedLine]) -> chrono::Duration { let mut max_inter_line_latency = chrono::Duration::milliseconds(1); for (index, line) in lines.iter().enumerate() { if index == 0 {