From 973db2a7534ffe6ec6d5460e5b002e61ee478a82 Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Sun, 11 Feb 2024 08:37:20 +0100 Subject: [PATCH] No need to require column number --- src/tui/ui.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/tui/ui.rs b/src/tui/ui.rs index 8ed4686..af602d3 100644 --- a/src/tui/ui.rs +++ b/src/tui/ui.rs @@ -353,8 +353,8 @@ struct Minibuffer<'a> { impl Minibuffer<'_> { fn paragraphs(state: &AppPublicState) -> Self { - let columns = 3; - let mb = match state { + let columns = 2; + match state { AppState::Browse(_) => Minibuffer { paragraphs: vec![ Paragraph::new("m: show info overlay"), @@ -384,11 +384,7 @@ impl Minibuffer<'_> { paragraphs: vec![Paragraph::new("Press ctrl+c to terminate the program...")], columns: 1, }, - }; - - // Callers will assume this. - assert!(mb.columns >= mb.paragraphs.len() as u16); - mb + } } }