From b4d6342de2fbd96b3ac6eb498a9ae4e01b9c8e60 Mon Sep 17 00:00:00 2001 From: Rajat Jindal Date: Tue, 31 Oct 2023 13:37:13 +0530 Subject: [PATCH] address review feedback Signed-off-by: Rajat Jindal --- src/commands/logs.rs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/commands/logs.rs b/src/commands/logs.rs index 3a0979e..d3b7737 100644 --- a/src/commands/logs.rs +++ b/src/commands/logs.rs @@ -144,17 +144,13 @@ fn print_logs(entries: &[Entry], show_timestamp: bool) -> Option<&str> { continue; }; - match &log_entry.time { - Some(time) => { - if show_timestamp { - println!("[{time}] {log}"); - } else { - println!("{log}"); - } - - since = Some(time.as_str()); + if let Some(time) = &log_entry.time { + if show_timestamp { + println!("[{time}] {log}"); + } else { + println!("{log}"); } - None => (), + since = Some(time.as_str()); } } }