From 1741df7a0e266af0e7a2d53cb5f1088e5f926ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=99=9B=E7=99=BD?= <18016038327@189.cn> Date: Thu, 10 Oct 2024 22:50:44 +0800 Subject: [PATCH] undo more rustfmt changes --- src/app/panel.rs | 6 ++---- src/command/panel_input.rs | 7 ++++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/app/panel.rs b/src/app/panel.rs index e7254858..6f54476e 100644 --- a/src/app/panel.rs +++ b/src/app/panel.rs @@ -35,6 +35,7 @@ pub struct Panel { } impl Panel { + pub fn new( id: PanelId, state: Box, @@ -58,10 +59,7 @@ impl Panel { pub fn set_error(&mut self, text: String) { self.status = Status::from_error(text); } - pub fn set_message>( - &mut self, - md: S, - ) { + pub fn set_message>(&mut self, md: S) { self.status = Status::from_message(md.into()); } diff --git a/src/command/panel_input.rs b/src/command/panel_input.rs index b0f4d1d2..855a1823 100644 --- a/src/command/panel_input.rs +++ b/src/command/panel_input.rs @@ -31,6 +31,7 @@ pub struct PanelInput { } impl PanelInput { + pub fn new(area: Area) -> Self { Self { input_field: InputField::new(area), @@ -379,9 +380,9 @@ impl PanelInput { let verb = if self.is_key_allowed_for_verb(key, mode) { self.find_key_verb( - key, - con, - sel_info, + key, + con, + sel_info, panel_state_type, ) } else {