From 3ccfa4509d0f3bb2e9f133b9f394876728084a98 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Mon, 15 Apr 2024 21:15:30 +0100 Subject: [PATCH] minor refactoring --- src/terminal_box.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/terminal_box.rs b/src/terminal_box.rs index 8e1703c..60e849c 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -166,9 +166,8 @@ where terminal.with_buffer(|buffer| { let mut layout_lines = 0; for line in &buffer.lines { - match line.layout_opt() { - Some(layout) => layout_lines += layout.len(), - None => (), + if let Some(layout) = line.layout_opt() { + layout_lines += layout.len() } }